Skip to content

Commit

Permalink
Update actions/checkout and actions/cache to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
m1r0 committed Nov 4, 2024
1 parent 45e7595 commit cf8e616
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-php/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ runs:
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
hookdocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: npm install, and build docs
run: |
npm ci
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
name: Plugin Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get npm cache directory
id: npm-cache
run: |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelogger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Changelogger used
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/deepen-to-merge-base
- uses: ./.github/actions/install-php
- name: Check change files are touched for touched projects
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/dependencies-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ jobs:
runs-on: ubuntu-latest
name: Build trunk for Dependencies Report
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: trunk
- shell: bash
name: Get trunk latest commit
id: trunk-commit
run: |
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
id: dist-cache
with:
path: ${{ github.workspace }}/assets/dist
Expand All @@ -27,7 +27,7 @@ jobs:
if: steps.dist-cache.outputs.cache-hit != 'true'
run: |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
if: steps.dist-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.npm-cache.outputs.dir }}
Expand All @@ -53,12 +53,12 @@ jobs:
name: WordPress Dependencies Report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get npm cache directory
id: npm-cache
run: |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.npm/
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: node_modules/
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gardening.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 22

- name: Wait for prior instances of the workflow to finish
uses: softprops/turnstyle@v1
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
name: JS Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.npm/
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: node_modules/
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
Expand All @@ -29,12 +29,12 @@ jobs:
name: TypeScript Checking
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.npm/
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: node_modules/
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
Expand All @@ -48,8 +48,8 @@ jobs:
runs-on: ubuntu-latest
steps:
# clone the repository
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get cached composer directories
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: vendor/
key: ${{ runner.os }}-vendor-${{ hashFiles('composer.lock') }}
Expand Down Expand Up @@ -84,14 +84,14 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get cached composer directories
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: vendor/
key: ${{ runner.os }}-vendor-${{ hashFiles('composer.lock') }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ jobs:
php: ['7.4', '8.2']
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get cached composer directories
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: vendor/
key: ${{ runner.os }}-vendor-${{ hashFiles('composer.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-checklist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Sensei release checklist
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Checklist
uses: automattic/contextual-qa-checklist-action@master
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/report-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Report Plugin Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Publish commit status with the link to download the plugin
id: plugin_artifact
uses: Automattic/github-action-report-artifact@v0
Expand Down

0 comments on commit cf8e616

Please sign in to comment.