Skip to content

Commit

Permalink
build(gha): update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Feb 2, 2023
1 parent ed4e3eb commit e6a4cc1
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 9 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/dispatch_command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ jobs:
dispatch:
runs-on: ubuntu-latest
steps:
- name: 'Slash Command Dispatch'
uses: peter-evans/slash-command-dispatch@v3
- uses: myparcelnl/actions/setup-git-credentials@v3
id: credentials
with:
token: ${{ secrets.GH_REPO_TOKEN }}
private-key: ${{ secrets.MYPARCEL_APP_PRIVATE_KEY }}
app-id: ${{ secrets.MYPARCEL_APP_ID }}

- uses: peter-evans/slash-command-dispatch@v3
with:
token: ${{ steps.credentials.outputs.token }}
commands: rebase
permission: write
issue-type: pull-request
24 changes: 20 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,38 @@ on:

workflow_dispatch: ~

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true

jobs:
release:
name: 'Build and publish 🚀'
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
token: ${{ secrets.GH_REPO_TOKEN }}

- uses: myparcelnl/actions/yarn-install@v2
# TODO: Switch to v3 with app credentials when GitHub apps are allowed to bypass status checks. https://github.com/orgs/community/discussions/43460
- uses: myparcelnl/actions/setup-git-credentials@v2
with:
token: ${{ secrets.GH_REPO_TOKEN }}

- uses: myparcelnl/actions/semantic-release@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_REPO_TOKEN }}

- uses: myparcelnl/actions/yarn-install@v3

- uses: myparcelnl/actions/semantic-release@v3
with:
token: ${{ secrets.GH_REPO_TOKEN }}


rebase:
name: 'Rebase develop onto main'
needs: release
Expand All @@ -36,7 +52,7 @@ jobs:
rebase-prs:
name: 'Rebase pull requests onto develop'
needs: rebase
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: peter-evans/rebase@v2
with:
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,26 @@ on:
repository_dispatch:
types: [ rebase-command ]

concurrency:
group: rebase-${{ github.event.client_payload.target || github.event.inputs.target || inputs.target }}
cancel-in-progress: true

jobs:
rebase:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: myparcelnl/actions/rebase@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
token: ${{ secrets.GH_REPO_TOKEN }}

# TODO: Switch to v3 with app credentials when GitHub apps are allowed to bypass status checks. https://github.com/orgs/community/discussions/43460
- uses: myparcelnl/actions/setup-git-credentials@v2
with:
token: ${{ secrets.GH_REPO_TOKEN }}

- uses: myparcelnl/actions/rebase@v3
with:
token: ${{ secrets.GH_REPO_TOKEN }}
target: ${{ github.event.client_payload.target || github.event.inputs.target || inputs.target }}
Expand Down

0 comments on commit e6a4cc1

Please sign in to comment.