Skip to content

Commit

Permalink
Fix handling of workflow artifacts. (netdata#18726)
Browse files Browse the repository at this point in the history
* Don't use symlinks when preparing static build artifacts.

* Roll back to v4.4.0 for actions/upload-artifact action.

There appears to be a bug in the latest release that is causing some
files to not be found when creating artifacts.

* Bump actions/upload-artifact to v4.4.2 which fixes the bugs.
  • Loading branch information
Ferroin authored Oct 8, 2024
1 parent f688378 commit 5225520
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:
- name: Store
id: store
if: needs.file-check.outputs.run == 'true'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.2
with:
name: dist-tarball
path: artifacts/*.tar.gz
Expand Down Expand Up @@ -245,7 +245,7 @@ jobs:
- name: Store
id: store
if: needs.file-check.outputs.run == 'true'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.2
with:
name: dist-static-${{ matrix.arch }}
path: artifacts/*.gz.run
Expand Down Expand Up @@ -349,7 +349,7 @@ jobs:
timestamp-digest: SHA256
- name: Upload Installer
id: upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.2
with:
name: windows-x86_64-installer
path: packaging\windows\netdata*.exe
Expand Down Expand Up @@ -440,7 +440,7 @@ jobs:
- name: Store Artifacts
id: store
if: needs.file-check.outputs.run == 'true'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.2
with:
name: final-artifacts
path: artifacts/*
Expand Down Expand Up @@ -926,7 +926,7 @@ jobs:
tags: test:${{ matrix.artifact_key }}
- name: Upload image artifact
id: upload
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.2
with:
name: ${{ matrix.artifact_key }}-test-env
path: /tmp/image.tar
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
- name: Upload Cache
id: upload-cache
if: github.repository == 'netdata/netdata' && needs.file-check.outputs.run == 'true' && github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.2
with:
name: cache-${{ steps.artifact-name.outputs.platform }}
path: /tmp/build-cache/*
Expand Down Expand Up @@ -296,7 +296,7 @@ jobs:
- name: Upload digest
id: upload-digest
if: github.repository == 'netdata/netdata'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.2
with:
name: docker-digests-${{ steps.artifact-name.outputs.platform }}
path: /tmp/digests/*
Expand Down Expand Up @@ -451,7 +451,7 @@ jobs:
- name: Upload digest
id: upload-digest
if: github.repository == 'netdata/netdata'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.2
with:
name: quay-digests-${{ steps.artifact-name.outputs.platform }}
path: /tmp/digests/*
Expand Down Expand Up @@ -607,7 +607,7 @@ jobs:
- name: Upload digest
id: upload-digest
if: github.repository == 'netdata/netdata'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.2
with:
name: ghcr-digests-${{ steps.artifact-name.outputs.platform }}
path: /tmp/digests/*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ jobs:
id: artifacts
if: needs.file-check.outputs.run == 'true'
continue-on-error: true
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.2
with:
name: ${{ matrix.distro }}-${{ matrix.version }}-${{ matrix.arch }}-packages
path: ${{ github.workspace }}/artifacts/*
Expand Down
6 changes: 3 additions & 3 deletions packaging/makeself/jobs/99-makeself.install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ run mkdir -p artifacts
run mv "${NETDATA_INSTALL_PATH}.gz.run" "artifacts/${FILE}"

[ -f "netdata-${BUILDARCH}-latest.gz.run" ] && rm "netdata-${BUILDARCH}-latest.gz.run"
run ln -s "artifacts/${FILE}" "netdata-${BUILDARCH}-latest.gz.run"
run cp "artifacts/${FILE}" "netdata-${BUILDARCH}-latest.gz.run"

if [ "${BUILDARCH}" = "x86_64" ]; then
[ -f "netdata-latest.gz.run" ] && rm "netdata-latest.gz.run"
run ln -s "artifacts/${FILE}" "netdata-latest.gz.run"
run cp "artifacts/${FILE}" "netdata-latest.gz.run"
[ -f "artifacts/netdata-${VERSION}.gz.run" ] && rm "netdata-${VERSION}.gz.run"
run ln -s "./${FILE}" "artifacts/netdata-${VERSION}.gz.run"
run cp "artifacts/${FILE}" "artifacts/netdata-${VERSION}.gz.run"
fi

# shellcheck disable=SC2015
Expand Down

0 comments on commit 5225520

Please sign in to comment.