Delete untagged images

This commit is contained in:
sebthom
2022-03-13 13:43:59 +01:00
parent 414df7736c
commit 5c07c21a71
2 changed files with 15 additions and 2 deletions

View File

@@ -165,7 +165,6 @@ jobs:
docker image tag $image_name ghcr.io/$image_name
docker push ghcr.io/$image_name
###########################################################
publish-release:
###########################################################
@@ -180,6 +179,20 @@ jobs:
# only required by "hub release create" to prevent "fatal: Not a git repository"
uses: actions/checkout@v3 #https://github.com/actions/checkout
- name: Generate GitHub Access Token
uses: tibdex/github-app-token@v1 #https://github.com/tibdex/github-app-token
id: generate_token
# see https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens
with:
# see https://github.com/organizations/Second-Hand-Friends/settings/apps/kleinanzeigen-bot-tu
app_id: ${{ secrets.DEPS_UPDATER_APP_ID }}
private_key: ${{ secrets.DEPS_UPDATER_PRIVATE_KEY }}
- name: "Delete untagged docker image"
uses: camargo/delete-untagged-action@v1
with:
github-token: ${{ steps.generate_token.outputs.token }}
- name: "Get: all build artifacts"
uses: actions/download-artifact@v2

View File

@@ -32,7 +32,7 @@ jobs:
id: generate_token
# see https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens
with:
# see https://github.com/organizations/Second-Hand-Friends/settings/apps/kleinanzeigen-bot-deps-updater
# see https://github.com/organizations/Second-Hand-Friends/settings/apps/kleinanzeigen-bot-tu
app_id: ${{ secrets.DEPS_UPDATER_APP_ID }}
private_key: ${{ secrets.DEPS_UPDATER_PRIVATE_KEY }}