Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ODS-6198] Updated Publish to Azure Artifacts build #1024

Open
wants to merge 1 commit into
base: main-5x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions .github/workflows/Publish to Azure Artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,18 @@ name: Publish to Azure Artifacts

on:
workflow_dispatch:
inputs:
timeout:
description: "Timeout before we stop trying (in milliseconds) for action-workflow-run-wait step"
required: true
default: '1800000'
delay:
description: "delay between status checks (in milliseconds) for action-workflow-run-wait step"
required: true
default: '10000'

workflow_run:
workflows: ["InitDev, Smoke Tests Sandbox, Year-Specific, and Shared Instance"]
workflows: ["InitDev,Unit tests,Integration tests,Smoke Tests using Sandbox, Year-Specific and Shared Instance", "InitDev,Unit tests,Integration tests,Package"]
types:
- completed
branches: ['main-5x', 'b-v*-patch*','feature-*']
Expand All @@ -17,6 +27,7 @@ env:
AZURE_ARTIFACT_NUGET_KEY: ${{ secrets.AZURE_ARTIFACTS_PERSONAL_ACCESS_TOKEN }}
VSS_NUGET_EXTERNAL_FEED_ENDPOINTS : '{"endpointCredentials": [{"endpoint": "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_packaging/EdFi/nuget/v3/index.json","password": "${{ secrets.AZURE_ARTIFACTS_PERSONAL_ACCESS_TOKEN }}"}]}'
INITDEV_COMMIT: ${{ github.event.workflow_run.head_sha}}
REPOSITORY_OWNER: ${{ GITHUB.REPOSITORY_OWNER }}

jobs:
build:
Expand All @@ -25,8 +36,24 @@ jobs:
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}

steps:
- name: Checkout Ed-Fi-ODS-Implementation
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Implementation
path: Ed-Fi-ODS-Implementation/
- name: Wait for ["InitDev,Unit tests,Integration tests,Smoke Tests using Sandbox, Year-Specific and Shared Instance", "InitDev,Unit tests,Integration tests,Package"] workflows to Complete
uses: ahmadnassri/action-workflow-run-wait@2aa3d9e1a12ecaaa9908e368eaf2123bb084323e #v1.4.4
with:
timeout: ${{inputs.timeout}}
delay: ${{inputs.delay}}
- name: Check for Azure token
if: ${{ env.REPOSITORY_OWNER == 'Ed-Fi-Alliance-OSS' && env.AZURE_ARTIFACT_NUGET_KEY == '' }}
run: |
echo "::error::Missing Azure Token"
exit 1

- name: Download SandboxAdmin,SwaggerUI,WebApi,Databases,EdFi.Ods.Api.Sdk,EdFi.SdkGen NugetPackages
uses: dawidd6/action-download-artifact@1cf11afe3f1874cee82a8d5a2b45c0fd63f0fa22 #v2.19.0
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 #v2.27.0
with:
workflow: InitDev,Unit tests,Integration tests,Package.yml
workflow_conclusion: success
Expand All @@ -39,6 +66,7 @@ jobs:
run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx"
shell: pwsh
- name: Publish to Azure Artifacts
if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' }}
working-directory: ./Ed-Fi-ODS-Implementation/
run: |
Get-ChildItem "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/NugetPackages/" -Filter *.nupkg |
Expand Down
Loading