Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
edlu77 committed Feb 14, 2024
1 parent b503133 commit f48b286
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .github/actions/deploy-comment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
using: composite
steps:
- name: Find Comment
uses: peter-evans/find-comment@v2
uses: peter-evans/find-comment@v3
id: 'fc'
with:
issue-number: ${{ github.event.pull_request.number }}
Expand All @@ -27,11 +27,11 @@ runs:
- name: Update Comment
if: steps.fc.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v2
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{steps.fc.outputs.comment-id}}
edit-mode: replace
body: |
# :rocket: Preview Deploy Report Updated
✅ Successfully deployed preview [here](${{ inputs.deploy-url }})
✅ Successfully deployed preview [here](${{ inputs.deploy-url }})
4 changes: 2 additions & 2 deletions .github/actions/prepare-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ runs:
if: ${{ inputs.skip-node-js == 'false' }}
uses: ./.github/actions/setup-node-js
- name: Configure nx
uses: nrwl/nx-set-shas@v3
uses: nrwl/nx-set-shas@v4
with:
main-branch-name: ${{ inputs.main-branch-name }}

Expand Down Expand Up @@ -72,4 +72,4 @@ runs:
variables: |
apps=${{ steps.collect.outputs.apps }}
storybook=${{ inputs.build-storybook == 'true' && steps.collect.outputs.storybook || '' }}
compodoc=${{ inputs.build-compodoc == 'true' && steps.collect.outputs.compodoc || '' }}
compodoc=${{ inputs.build-compodoc == 'true' && steps.collect.outputs.compodoc || '' }}
2 changes: 1 addition & 1 deletion .github/actions/prepare-deploy/collect_artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ while (( "$#" )); do
echo "${dir_name}=${sub_dirs}" >> "${GITHUB_OUTPUT}"
fi
shift
done
done
2 changes: 1 addition & 1 deletion .github/actions/prepare-deploy/index.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
{{ createLinks('Storybook', storybook) }}
{{ createLinks('Compodoc', compodoc) }}
</body>
</html>
</html>
8 changes: 4 additions & 4 deletions .github/actions/setup-node-js/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ inputs:
node-version:
description: Node.js version
required: false
default: '16'
default: '20'

runs:
using: composite
steps:
- name: Use Node.js ${{ inputs.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
- name: Cache .npm
Expand All @@ -23,11 +23,11 @@ runs:
${{ runner.os }}-node-
- name: Cache node_modules
id: modules_cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
shell: bash
if: ${{ steps.modules_cache.outputs.cache-hit != 'true' }}
run: npm ci --ignore-scripts
run: npm ci --ignore-scripts
4 changes: 2 additions & 2 deletions .github/workflows/build-previews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -36,4 +36,4 @@ jobs:
- name: Create Deploy Comment
uses: ./.github/actions/deploy-comment
with:
deploy-url: ${{steps.deploy.outputs.NETLIFY_URL}}
deploy-url: ${{steps.deploy.outputs.NETLIFY_URL}}
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,14 @@ on:
- develop
pull_request:

defaults:
run:
working-directory: ./website

concurrency:
group: ci-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
main:
name: Nx Cloud - Main Job
uses: nrwl/ci/.github/workflows/[email protected]
uses: nrwl/ci/.github/workflows/[email protected].0
with:
number-of-agents: 3
init-commands: |
Expand All @@ -35,7 +31,7 @@ jobs:

agents:
name: Nx Cloud - Agents
uses: nrwl/ci/.github/workflows/[email protected]
uses: nrwl/ci/.github/workflows/[email protected].0
with:
number-of-agents: 3

Expand All @@ -49,4 +45,4 @@ jobs:
with:
job-status: ${{ needs.main.result }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel: github
channel: github
4 changes: 2 additions & 2 deletions .github/workflows/production-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
Expand All @@ -30,4 +30,4 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: deploy
commit_message: 'Staging deploy -- ${{ github.event.head_commit.message }}'
commit_message: 'Staging deploy -- ${{ github.event.head_commit.message }}'
4 changes: 2 additions & 2 deletions .github/workflows/staging-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: develop
fetch-depth: 0
Expand All @@ -31,4 +31,4 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: deploy
publish_branch: staging
commit_message: 'Staging deploy -- ${{ github.event.head_commit.message }}'
commit_message: 'Staging deploy -- ${{ github.event.head_commit.message }}'

0 comments on commit f48b286

Please sign in to comment.