Skip to content

Update BC Artifact Version #884

Update BC Artifact Version

Update BC Artifact Version #884

name: Update BC Artifact Version
on:
workflow_dispatch:
schedule:
- cron: '55 5 * * *' # Daily at 05:55 UTC
defaults:
run:
shell: powershell
permissions: read-all
jobs:
GetBranches:
name: Get Official Branches
if: github.repository_owner == 'microsoft'
runs-on: ubuntu-latest
outputs:
updateBranches: ${{ steps.getOfficialBranches.outputs.branchesJson }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- name: Get Official Branches
id: getOfficialBranches
uses: microsoft/BCApps/.github/actions/GetGitBranches@main
with:
include: "['main', 'releases/*']"
UpdateBCArtifactVersion:
name: "[${{ matrix.branch }}] Update BC Artifact Version"
if: github.repository_owner == 'microsoft'
permissions:
contents: write
environment: Official-Build
runs-on: windows-latest
needs: GetBranches
strategy:
matrix:
branch: ${{ fromJson(needs.GetBranches.outputs.updateBranches) }}
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
ref: ${{ matrix.branch }}
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- name: Update BC Artifact Version
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
uses: microsoft/BCApps/.github/actions/RunAutomation@main
with:
automations: UpdateBCArtifact
targetBranch: ${{ matrix.branch }}