Skip to content

Commit

Permalink
Add trigger and needs constraint to promotion workflow (infra) (canon…
Browse files Browse the repository at this point in the history
…ical#921)

Add needs constraint to promotion workflow
  • Loading branch information
Hook25 authored and LiaoU3 committed Mar 20, 2024
1 parent 9046962 commit a5a21f3
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/checkbox-beta-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,34 @@ name: Beta version of checkbox
run-name: Promote edge versions of checkbox to beta

on:
push:
branches:
- beta
workflow_dispatch:

jobs:
should-run:
runs-on: [self-hosted, linux, large]
- name: Setup the gh repository and install gh
run: |
which curl || (sudo apt update && sudo apt install curl -y)
sudo curl https://cli.github.com/packages/githubcli-archive-keyring.gpg --output /usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
gpg --import /usr/share/keyrings/githubcli-archive-keyring.gpg
gpg --fingerprint "2C6106201985B60E6C7AC87323F3D4EA75716059"
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update -qq
sudo apt install -qq -y gh
- name: Checkout checkbox monorepo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Verify Promotion Conditions
run: |
tools/release/can_promote_edge.py
release-notes:
needs: should-run
runs-on: [self-hosted, linux, large]
steps:
- name: Checkout checkbox monorepo
Expand All @@ -31,6 +55,7 @@ jobs:
gh release create $(git describe --tags --abbrev=0 --match v*) -d --generate-notes
checkbox_deb_packages:
needs: should-run
name: Checkbox Debian packages
runs-on: [self-hosted, linux, large]
steps:
Expand All @@ -49,6 +74,7 @@ jobs:
tools/release/lp_copy_packages.py checkbox-dev edge checkbox-dev beta
checkbox_core_snap:
needs: should-run
name: Checkbox core snap packages
runs-on: [self-hosted, linux, large]
env:
Expand All @@ -70,6 +96,7 @@ jobs:
yes | snapcraft promote checkbox22 --from-channel latest/edge --to-channel latest/beta
checkbox_snap:
needs: should-run
name: Checkbox snap packages
runs-on: [self-hosted, linux, large]
env:
Expand Down

0 comments on commit a5a21f3

Please sign in to comment.