Skip to content

Commit

Permalink
ci/cd: centralize and bump artifact uploads
Browse files Browse the repository at this point in the history
- Upgrade `actions/upload-artifact` to `v4` to address deprecation
  warnings related to Node.js 16, improving compatibility with GitHub
  runners. This resolves the following warning from the runners:
  > Node.js 16 actions are deprecated. Please update the following actions
  > to use Node.js 20: actions/upload-artifact@v3.
- Centralize the use of the `upload-artifact` action through a new
  custom action, improving maintainability and consistency across
  workflows.
  • Loading branch information
undergroundwires committed May 28, 2024
1 parent 795b7f0 commit 22d6c79
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
15 changes: 15 additions & 0 deletions .github/actions/upload-artifact/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
inputs:
name:
required: true
path:
required: true

runs:
using: composite
steps:
-
name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
2 changes: 1 addition & 1 deletion .github/workflows/checks.desktop-runtime-errors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
-
name: Upload screenshot
if: always() # Run even if previous step fails
uses: actions/upload-artifact@v3
uses: ./.github/actions/upload-artifact
with:
name: screenshot-${{ matrix.os }}
path: screenshot.png
4 changes: 2 additions & 2 deletions .github/workflows/tests.e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ jobs:
-
name: Upload screenshots
if: failure() # Run only if previous steps fail because screenshots will be generated only if E2E test failed
uses: actions/upload-artifact@v3
uses: ./.github/actions/upload-artifact
with:
name: e2e-screenshots-${{ matrix.os }}
path: ${{ steps.artifacts.outputs.SCREENSHOTS_DIR }}
-
name: Upload videos
if: always() # Run even if previous steps fail because test run video is always captured
uses: actions/upload-artifact@v3
uses: ./.github/actions/upload-artifact
with:
name: e2e-videos-${{ matrix.os }}
path: ${{ steps.artifacts.outputs.VIDEOS_DIR }}

0 comments on commit 22d6c79

Please sign in to comment.