You've already forked library-registry
mirror of
https://github.com/arduino/library-registry.git
synced 2025-12-09 17:01:16 +03:00
Merge pull request #3750 from arduino/dependabot/github_actions/actions/upload-artifact-4
Bump actions/upload-artifact from 3 to 4
This commit is contained in:
34
.github/workflows/manage-prs.yml
vendored
34
.github/workflows/manage-prs.yml
vendored
@@ -5,7 +5,7 @@ env:
|
|||||||
MAINTAINERS: |
|
MAINTAINERS: |
|
||||||
# GitHub user names to request reviews from in cases where PRs can't be managed automatically.
|
# GitHub user names to request reviews from in cases where PRs can't be managed automatically.
|
||||||
- per1234
|
- per1234
|
||||||
CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT: check-submissions-failed
|
CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_PREFIX: check-submissions-failed-
|
||||||
ERROR_MESSAGE_PREFIX: ":x: **ERROR:** "
|
ERROR_MESSAGE_PREFIX: ":x: **ERROR:** "
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -114,7 +114,7 @@ jobs:
|
|||||||
run: echo "::set-output name=head::$(jq -c .head.sha "${{ steps.configuration.outputs.path }}/${{ env.JSON_IDENTIFIER }}")"
|
run: echo "::set-output name=head::$(jq -c .head.sha "${{ steps.configuration.outputs.path }}/${{ env.JSON_IDENTIFIER }}")"
|
||||||
|
|
||||||
- name: Upload diff file to workflow artifact
|
- name: Upload diff file to workflow artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.configuration.outputs.path }}/${{ steps.configuration.outputs.filename }}
|
path: ${{ steps.configuration.outputs.path }}/${{ steps.configuration.outputs.filename }}
|
||||||
name: ${{ steps.configuration.outputs.artifact }}
|
name: ${{ steps.configuration.outputs.artifact }}
|
||||||
@@ -144,13 +144,13 @@ jobs:
|
|||||||
location: ${{ runner.temp }}
|
location: ${{ runner.temp }}
|
||||||
|
|
||||||
- name: Download diff
|
- name: Download diff
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ needs.diff.outputs.path }}
|
path: ${{ needs.diff.outputs.path }}
|
||||||
name: ${{ needs.diff.outputs.artifact }}
|
name: ${{ needs.diff.outputs.artifact }}
|
||||||
|
|
||||||
- name: Remove no longer needed artifact
|
- name: Remove no longer needed artifact
|
||||||
uses: geekyeggo/delete-artifact@v2
|
uses: geekyeggo/delete-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.diff.outputs.artifact }}
|
name: ${{ needs.diff.outputs.artifact }}
|
||||||
|
|
||||||
@@ -376,16 +376,23 @@ jobs:
|
|||||||
if: env.PASS == 'false'
|
if: env.PASS == 'false'
|
||||||
run: touch ${{ env.FAIL_FLAG_PATH }} # Arbitrary file to provide content for the flag artifact
|
run: touch ${{ env.FAIL_FLAG_PATH }} # Arbitrary file to provide content for the flag artifact
|
||||||
|
|
||||||
|
# Each workflow artifact must have a unique name. The job matrix doesn't provide a guaranteed unique string to use
|
||||||
|
# for a name so it is necessary to generate one.
|
||||||
|
- name: Generate unique artifact suffix
|
||||||
|
if: env.PASS == 'false'
|
||||||
|
run: |
|
||||||
|
echo "CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_SUFFIX=$(cat /proc/sys/kernel/random/uuid)" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
# The value of a job matrix output is set by whichever job happened to run last, not of use for this application.
|
# The value of a job matrix output is set by whichever job happened to run last, not of use for this application.
|
||||||
# So it's necessary to use an alternative means of indicating that at least one submission failed the checks.
|
# So it's necessary to use an alternative means of indicating that at least one submission failed the checks.
|
||||||
- name: Upload failure flag artifact
|
- name: Upload failure flag artifact
|
||||||
if: env.PASS == 'false'
|
if: env.PASS == 'false'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
include-hidden-files: true
|
include-hidden-files: true
|
||||||
path: ${{ env.FAIL_FLAG_PATH }}
|
path: ${{ env.FAIL_FLAG_PATH }}
|
||||||
name: ${{ env.CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT }}
|
name: ${{ env.CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_PREFIX }}${{ env.CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_SUFFIX }}
|
||||||
|
|
||||||
check-submissions-result:
|
check-submissions-result:
|
||||||
needs: check-submissions
|
needs: check-submissions
|
||||||
@@ -394,13 +401,22 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
pass: ${{ steps.failure-flag-exists.outcome == 'failure' }}
|
pass: ${{ steps.failure-flag-exists.outcome == 'failure' }}
|
||||||
|
|
||||||
|
env:
|
||||||
|
CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_PATH: ${{ github.workspace }}/artifacts
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Download submission check failure flag artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
path: ${{ env.CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_PATH }}
|
||||||
|
pattern: ${{ env.CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_PREFIX }}*
|
||||||
|
|
||||||
- name: Check for existence of submission check failure flag artifact
|
- name: Check for existence of submission check failure flag artifact
|
||||||
id: failure-flag-exists
|
id: failure-flag-exists
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
# actions/download-artifact does not create a folder per its `path` input if no artifacts match `pattern`.
|
||||||
name: ${{ env.CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT }}
|
run: |
|
||||||
|
test -d "${{ env.CHECK_SUBMISSIONS_FAIL_FLAG_ARTIFACT_PATH }}"
|
||||||
|
|
||||||
check-submissions-fail:
|
check-submissions-fail:
|
||||||
needs:
|
needs:
|
||||||
|
|||||||
19
.github/workflows/sync-labels.yml
vendored
19
.github/workflows/sync-labels.yml
vendored
@@ -19,7 +19,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
CONFIGURATIONS_FOLDER: .github/label-configuration-files
|
CONFIGURATIONS_FOLDER: .github/label-configuration-files
|
||||||
CONFIGURATIONS_ARTIFACT: label-configuration-files
|
CONFIGURATIONS_ARTIFACT_PREFIX: label-configuration-file-
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
@@ -70,13 +70,13 @@ jobs:
|
|||||||
file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }}
|
file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }}
|
||||||
|
|
||||||
- name: Pass configuration files to next job via workflow artifact
|
- name: Pass configuration files to next job via workflow artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
*.yaml
|
*.yaml
|
||||||
*.yml
|
*.yml
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
|
name: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}${{ matrix.filename }}
|
||||||
|
|
||||||
sync:
|
sync:
|
||||||
needs: download
|
needs: download
|
||||||
@@ -107,16 +107,17 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download configuration files artifact
|
- name: Download configuration file artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
|
merge-multiple: true
|
||||||
|
pattern: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}*
|
||||||
path: ${{ env.CONFIGURATIONS_FOLDER }}
|
path: ${{ env.CONFIGURATIONS_FOLDER }}
|
||||||
|
|
||||||
- name: Remove unneeded artifact
|
- name: Remove unneeded artifacts
|
||||||
uses: geekyeggo/delete-artifact@v2
|
uses: geekyeggo/delete-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
|
name: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}*
|
||||||
|
|
||||||
- name: Merge label configuration files
|
- name: Merge label configuration files
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user