Skip to content

Commit

Permalink
build(gha): update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Feb 15, 2024
1 parent 022c980 commit 937f52a
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 29 deletions.
5 changes: 5 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ description: 'Sets up environment and creates a build'
runs:
using: composite
steps:
- uses: myparcelnl/actions/yarn-install@v4
with:
node-version: ${{ vars.NODE_VERSION }}

- name: 'Build packages'
shell: bash
#language=bash
run: |
NX_BRANCH=production yarn nx run-many \
--runner=cloud \
Expand Down
9 changes: 0 additions & 9 deletions .github/actions/install/action.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pull-request-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
assign-author:
runs-on: ubuntu-22.04
steps:
- uses: myparcelnl/actions/pr-assign-author@v3
- uses: myparcelnl/actions/pr-assign-author@v4
with:
app-id: ${{ secrets.MYPARCEL_APP_ID }}
private-key: ${{ secrets.MYPARCEL_APP_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
label:
runs-on: ubuntu-22.04
steps:
- uses: myparcelnl/actions/pr-label-by-review@v3
- uses: myparcelnl/actions/pr-label-by-review@v4
with:
app-id: ${{ secrets.MYPARCEL_APP_ID }}
private-key: ${{ secrets.MYPARCEL_APP_PRIVATE_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: myparcelnl/actions/pr-validate-title-conventional@v3
- uses: myparcelnl/actions/pr-validate-title-conventional@v4
with:
app-id: ${{ secrets.MYPARCEL_APP_ID }}
private-key: ${{ secrets.MYPARCEL_APP_PRIVATE_KEY }}
8 changes: 3 additions & 5 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ jobs:
bundlewatch:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/install
- uses: actions/checkout@v4

- uses: ./.github/actions/build

- uses: myparcelnl/actions/setup-git-credentials@v3
- uses: myparcelnl/actions/setup-git-credentials@v4
id: credentials
with:
app-id: ${{ secrets.MYPARCEL_APP_ID }}
Expand All @@ -37,6 +35,6 @@ jobs:
shell: bash
run: git fetch --no-tags --prune --depth=1 origin ${{ github.base_ref }}

- uses: myparcelnl/actions/bundlewatch@v3
- uses: myparcelnl/actions/bundlewatch@v4
with:
token: ${{ inputs.bundlewatch-token }}
15 changes: 7 additions & 8 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-22.04
needs: test
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
token: ${{ secrets.GH_REPO_TOKEN }}
Expand All @@ -29,20 +29,19 @@ jobs:
with:
token: ${{ secrets.GH_REPO_TOKEN }}

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_REPO_TOKEN }}

- uses: ./.github/actions/install

- uses: ./.github/actions/build

- uses: actions/upload-pages-artifact@v1
- uses: actions/upload-pages-artifact@v3
with:
path: ./apps/admin-demo/dist

- name: 'Run monodeploy'
#language=bash
run: |
yarn monodeploy \
--config-file monodeploy.config.cjs \
Expand All @@ -56,13 +55,13 @@ jobs:
if: always()
runs-on: ubuntu-22.04
steps:
- uses: myparcelnl/actions/setup-git-credentials@v3
- uses: myparcelnl/actions/setup-git-credentials@v4
id: credentials
with:
app-id: ${{ secrets.MYPARCEL_APP_ID }}
private-key: ${{ secrets.MYPARCEL_APP_PRIVATE_KEY }}

- uses: peter-evans/rebase@v2
- uses: peter-evans/rebase@v3
with:
token: ${{ steps.credentials.outputs.token }}
base: ${{ github.ref_name }}
Expand All @@ -80,4 +79,4 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/install
- uses: actions/checkout@v4

- uses: ./.github/actions/build

- name: 'Run tests'
shell: bash
env:
NX_BRANCH: ${{ github.event.inputs.branch || github.head_ref || github.ref }}
#language=bash
run: |
yarn nx run-many \
--runner=cloud \
Expand All @@ -28,13 +27,15 @@ jobs:
- name: 'Rename coverage files'
shell: bash
#language=bash
run: |
yarn workspaces foreach -Apv \
--exclude=. \
exec \
bash -c 'if [ -f coverage/clover.xml ]; then mv coverage/clover.xml coverage/${npm_package_name//\//-}.xml; fi' -- {}
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
files: coverage/*.xml
flags: unit
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 937f52a

Please sign in to comment.