Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Github artifact actions to v4 #7698

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Plugin Build

on:
on:
- pull_request
- workflow_call

Expand All @@ -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 All @@ -29,7 +29,7 @@ jobs:
- name: Decompress plugin
run: unzip sensei-lms.zip -d sensei-lms
- name: Store Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sensei-lms-${{ github.event.pull_request.head.sha }}
path: ${{ github.workspace }}/sensei-lms/
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
php: [7.4, 8.2]
steps:
- name: Download Build Artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: sensei-lms-${{ github.event.pull_request.head.sha }}

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
14 changes: 7 additions & 7 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 @@ -44,7 +44,7 @@ jobs:
run: npm run build:combine-assets
if: steps.dist-cache.outputs.cache-hit != 'true'
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: combined-assets
path: ${{ github.workspace }}/assets/dist
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 All @@ -69,7 +69,7 @@ jobs:
- name: Build Combined Assets
run: npm run build:combine-assets
- name: Download assets (trunk)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: combined-assets
path: dist-trunk
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ 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') }}


- name: Install PHP dependencies
uses: ./.github/actions/install-php
Expand All @@ -44,7 +44,7 @@ jobs:
run: npx playwright install --with-deps chromium

- name: Start wp-env
run: npm run wp-env start
run: npm run wp-env start

- name: Run Playwright tests with @setup annotation
run: CI=true npm run test:e2e:setup-only
Expand All @@ -53,7 +53,7 @@ jobs:
run: CI=true npm run test:e2e

- name: Archive report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-report
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
Loading