mirror of
https://github.com/rajnandan1/kener.git
synced 2026-06-23 04:10:22 +00:00
fix: delete existing version artifact
* Delete existing version artifact if it exists * Upload `versions.txt` only on first successful job
This commit is contained in:
@@ -118,7 +118,14 @@ jobs:
|
||||
- name: Verify Saved Versions
|
||||
run: cat versions.txt
|
||||
|
||||
- name: Delete Existing Version Artifact (If Exists)
|
||||
run: gh api -X DELETE repos/${{ github.repository }}/actions/artifacts/$(gh api repos/${{ github.repository }}/actions/artifacts --jq '.artifacts[] | select(.name=="version-metadata") | .id')
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload Version File
|
||||
# Always run this on the first successful job only
|
||||
if: github.run_attempt == 1
|
||||
uses: actions/upload-artifact@v4.6.0
|
||||
with:
|
||||
name: version-metadata
|
||||
|
||||
Reference in New Issue
Block a user