Skip to content

Commit

Permalink
ci: prepare for promotion/PRs on seperate branches (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsgruk authored Feb 21, 2024
1 parent 367d954 commit 1f6571f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/promote-to-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,37 @@ permissions:
issues: write

jobs:
promote:
name: ⬆️ Promote to stable
promote-latest:
name: ⬆️ Promote to latest/stable
environment: "Candidate Branch"
runs-on: ubuntu-latest
if: |
( !github.event.issue.pull_request )
&& contains(github.event.comment.body, '/promote ')
&& contains(github.event.comment.body, 'latest/stable')
&& contains(github.event.issue.body, 'latest/stable')
&& contains(github.event.*.labels.*.name, 'testing')
steps:
- name: ⬆️ Promote to stable
- name: ⬆️ Promote to latest/stable
uses: snapcrafters/ci/promote-to-stable@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
store-token: ${{ secrets.SNAP_STORE_STABLE }}

promote-dev:
name: ⬆️ Promote to dev/stable
environment: "Dev Branch"
runs-on: ubuntu-latest
if: |
( !github.event.issue.pull_request )
&& contains(github.event.comment.body, '/promote ')
&& contains(github.event.comment.body, 'dev/stable')
&& contains(github.event.issue.body, 'dev/stable')
&& contains(github.event.*.labels.*.name, 'testing')
steps:
- name: ⬆️ Promote to dev/stable
uses: snapcrafters/ci/promote-to-stable@main
with:
channel: dev/stable
github-token: ${{ secrets.GITHUB_TOKEN }}
store-token: ${{ secrets.SNAP_STORE_STABLE }}
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Pull Request

on:
pull_request:
branches: ["**"]
branches: ["candidate"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down

0 comments on commit 1f6571f

Please sign in to comment.