mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-25 01:46:09 +00:00
chore(release-pr): update upload-artifact action to v4 (#9859)
* chore(release-pr): update `upload-artifact` and `download-artifact` actions to v4 v3 of `actions/upload-artifact` and `actions/download-artifact` will be fully deprecated by 5 December 2024. Jobs that are scheduled to run during the brownout periods will also fail. See [1][2]. [1]: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/ [2]: https://github.blog/changelog/2024-11-05-notice-of-breaking-changes-for-github-actions/ Signed-off-by: Eng Zer Jun <engzerjun@gmail.com> * Unique artifact name Reference: https://github.com/nocodb/nocodb/pull/9859#pullrequestreview-2488379782 Signed-off-by: Eng Zer Jun <engzerjun@gmail.com> --------- Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
13
.github/workflows/release-pr.yml
vendored
13
.github/workflows/release-pr.yml
vendored
@@ -107,9 +107,9 @@ jobs:
|
||||
envsubst < .github/uffizzi/docker-compose.uffizzi.yml > docker-compose.rendered.yml
|
||||
cat docker-compose.rendered.yml
|
||||
- name: Upload Rendered Compose File as Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: preview-spec
|
||||
name: preview-spec-docker-compose
|
||||
path: docker-compose.rendered.yml
|
||||
retention-days: 2
|
||||
- name: Serialize PR Event to File
|
||||
@@ -118,9 +118,9 @@ jobs:
|
||||
${{ toJSON(github.event) }}
|
||||
EOF
|
||||
- name: Upload PR Event as Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: preview-spec
|
||||
name: preview-spec-event
|
||||
path: event.json
|
||||
retention-days: 2
|
||||
|
||||
@@ -174,8 +174,9 @@ jobs:
|
||||
|
||||
EOF
|
||||
- name: Upload PR Event as Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: preview-spec
|
||||
name: preview-spec-event
|
||||
path: event.json
|
||||
retention-days: 2
|
||||
overwrite: true
|
||||
|
||||
29
.github/workflows/uffizzi-preview.yml
vendored
29
.github/workflows/uffizzi-preview.yml
vendored
@@ -20,31 +20,14 @@ jobs:
|
||||
steps:
|
||||
- name: 'Download artifacts'
|
||||
# Fetch output (zip archive) from the workflow run that triggered this workflow.
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
script: |
|
||||
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
run_id: context.payload.workflow_run.id,
|
||||
});
|
||||
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
|
||||
return artifact.name == "preview-spec"
|
||||
})[0];
|
||||
if (matchArtifact === undefined) {
|
||||
throw TypeError('Build Artifact not found!');
|
||||
}
|
||||
let download = await github.rest.actions.downloadArtifact({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
artifact_id: matchArtifact.id,
|
||||
archive_format: 'zip',
|
||||
});
|
||||
let fs = require('fs');
|
||||
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/preview-spec.zip`, Buffer.from(download.data));
|
||||
path: preview-spec
|
||||
pattern: preview-spec-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: 'Accept event from first stage'
|
||||
run: unzip preview-spec.zip event.json
|
||||
run: cp preview-spec/event.json .
|
||||
|
||||
- name: Read Event into ENV
|
||||
id: event
|
||||
@@ -58,7 +41,7 @@ jobs:
|
||||
# If the previous workflow was triggered by a PR close event, we will not have a compose file artifact.
|
||||
if: ${{ steps.event.outputs.ACTION != 'closed' }}
|
||||
run: |
|
||||
unzip preview-spec.zip docker-compose.rendered.yml
|
||||
cp preview-spec/docker-compose.rendered.yml .
|
||||
echo "COMPOSE_FILE_HASH=$(md5sum docker-compose.rendered.yml | awk '{ print $1 }')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache Rendered Compose File
|
||||
|
||||
Reference in New Issue
Block a user