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

Add trigger and needs constraint to promotion workflow (infra) #921

Merged
merged 1 commit into from
Jan 9, 2024
Merged
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
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