Publish (insiders-fast) #741
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish (insiders-fast) | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 8 * * *' # Every day at 8am UTC (12am PST) | |
jobs: | |
changes: | |
name: Check changes | |
if: ${{ github.event_name == 'schedule' }} | |
runs-on: ubuntu-latest | |
outputs: | |
new: ${{ steps.commits.outputs.new }} | |
status: ${{ steps.last_scheduled_workflow_status.outputs.status }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check last commit | |
id: commits | |
run: | | |
# If the last commit was greater than 24 hours ago, skip the build | |
if [[ $(git log -1 --format=%ct) -lt $(date -d '24 hours ago' +%s) ]]; then | |
echo new=false >> $GITHUB_OUTPUT | |
else | |
echo new=true >> $GITHUB_OUTPUT | |
fi | |
- name: Check last scheduled workflow status | |
id: last_scheduled_workflow_status | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
# Get RUN ID of last workflow, not the current one | |
last_workflow_run_id=$(gh run list --workflow='Publish (insiders-fast)' --event=schedule --limit=2 --json databaseId -q '.[1].databaseId') | |
echo status=$(gh run view '$last_workflow_run_id' --json conclusion -q '.conclusion') >> $GITHUB_OUTPUT | |
publish: | |
name: Publish | |
needs: changes | |
if: | | |
always() && | |
(needs.changes.outputs.new == 'true' || github.event_name == 'workflow_dispatch' || needs.changes.outputs.status != 'success') | |
uses: ./.github/workflows/publish-pmc.yml | |
strategy: | |
matrix: | |
target: | |
[ | |
# Skip ARM64 CI builds for now | |
{ os: amazonlinux, version: 2, arch: amd64, dist: amazonlinux2, package-type: RPM, repo: microsoft-amazonlinux2-insiders-fast-prod-yum, container-tag: latest }, | |
{ os: centos, version: 7, arch: amd64, dist: centos7, package-type: RPM, repo: microsoft-centos7-insiders-fast-prod-yum, container-tag: latest }, | |
{ os: centos, version: 8, arch: amd64, dist: centos8, package-type: RPM, repo: microsoft-centos8-insiders-fast-prod-yum, container-tag: latest }, | |
{ os: debian, version: 10, arch: amd64, dist: buster, package-type: DEB, repo: microsoft-debian-buster-prod-apt, container-tag: latest }, | |
# { os: debian, version: 10, arch: arm64, dist: buster, package-type: DEB, repo: microsoft-debian-buster-prod-apt, container-tag: sha-c689eee }, | |
{ os: debian, version: 11, arch: amd64, dist: bullseye, package-type: DEB, repo: microsoft-debian-bullseye-prod-apt, container-tag: latest }, | |
# { os: debian, version: 11, arch: arm64, dist: bullseye, package-type: DEB, repo: microsoft-debian-bullseye-prod-apt, container-tag: sha-c689eee }, | |
{ os: debian, version: 12, arch: amd64, dist: bookworm, package-type: DEB, repo: microsoft-debian-bookworm-prod-apt, container-tag: latest }, | |
# { os: debian, version: 12, arch: arm64, dist: bookworm, package-type: DEB, repo: microsoft-debian-bookworm-prod-apt, container-tag: sha-db3d4c8 }, | |
{ os: mariner, version: 2, arch: amd64, dist: azurelinux, package-type: RPM, repo: cbl-mariner-2.0-preview-Microsoft-x86_64-yum, container-tag: latest }, | |
{ os: rhel, version: 7, arch: amd64, dist: rhel7, package-type: RPM, repo: microsoft-rhel7.4-insiders-fast-prod-yum, container-tag: latest }, | |
{ os: rhel, version: 8, arch: amd64, dist: rhel8, package-type: RPM, repo: microsoft-rhel8.0-insiders-fast-prod-yum, container-tag: latest }, | |
{ os: rhel, version: 9, arch: amd64, dist: rhel9, package-type: RPM, repo: microsoft-rhel9.0-insiders-fast-prod-yum, container-tag: latest }, | |
{ os: rockylinux, version: 9, arch: amd64, dist: rockylinux9, package-type: RPM, repo: microsoft-el9-insiders-fast-prod-yum, container-tag: latest }, | |
{ os: sles, version: 15, arch: amd64, dist: sles15, package-type: RPM, repo: microsoft-sles15-insiders-fast-prod-yum, container-tag: latest }, | |
{ os: ubuntu, version: 20.04, arch: amd64, dist: focal, package-type: DEB, repo: microsoft-ubuntu-focal-prod-apt, container-tag: latest }, | |
# { os: ubuntu, version: 20.04, arch: arm64, dist: focal, package-type: DEB, repo: microsoft-ubuntu-focal-prod-apt, container-tag: sha-c689eee }, | |
{ os: ubuntu, version: 22.04, arch: amd64, dist: jammy, package-type: DEB, repo: microsoft-ubuntu-jammy-prod-apt, container-tag: latest }, | |
# { os: ubuntu, version: 22.04, arch: arm64, dist: jammy, package-type: DEB, repo: microsoft-ubuntu-jammy-prod-apt, container-tag: sha-db3d4c8 }, | |
] | |
with: | |
target: ${{ matrix.target.os }}-${{ matrix.target.version }} | |
arch: ${{ matrix.target.arch }} | |
repo: ${{ matrix.target.repo }} | |
dist: ${{ matrix.target.dist }} | |
environment: insiders-fast | |
# ESRP debian based repos (deb) have channels/rings on repos. | |
# ESRP yum based repos (rpm) have no channels | |
channel: ${{ matrix.target.package-type == 'DEB' && 'insiders-fast' || '' }} | |
package-type: ${{ matrix.target.package-type }} | |
container-tag: ${{ matrix.target.container-tag }} | |
secrets: inherit |