Skip to content

Commit

Permalink
workflows: delete Docker image artifact during fly deploy
Browse files Browse the repository at this point in the history
This is the relevant API endpoint:

https://octokit.github.io/rest.js/v21/#actions-delete-artifact

Turns out that these artifacts can accumulate and add up to a limit.
We don't need the docker image after it's been downloaded and ready to
deploy, so just delete it when we're done.
  • Loading branch information
jordigh committed Dec 3, 2024
1 parent ef3e816 commit 448020b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/fly-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/docker-image.zip', Buffer.from(download.data));
await github.rest.actions.deleteArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
});
- name: Extract artifacts
id: extract_artifacts
run: |
Expand Down

0 comments on commit 448020b

Please sign in to comment.