Skip to content

Commit 1d5bc3d

Browse files
committed
feat: trigger on release create
1 parent 0abc9e1 commit 1d5bc3d

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

.github/workflows/delete-old-image.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,22 @@ name: Delete Old Docker Image
22

33
on:
44
workflow_dispatch:
5-
5+
push:
6+
branches:
7+
- main
68
jobs:
79

810
cleanup-pg:
911
runs-on: ubuntu-latest
12+
1013
steps:
1114

1215
- name: Cleanup Docker images from GHCR
1316
uses: dataaxiom/ghcr-cleanup-action@v1
1417
with:
15-
token: ${{ secrets.GITHUB_TOKEN }}
16-
owner: ${{ github.repository_owner }}
17-
repository: multi-repo/Postgres
18+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
19+
owner: multi-repo
20+
repository: postgres
1821
keep-n-tagged: 1
19-
package: multi-repo/Postgres/pg
22+
package: postgres/pg
2023
dry-run: false

.github/workflows/docker-builds.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: Build Docker Images
22

33
on:
4+
release:
5+
types: [published]
46
push:
57
branches:
68
- main
7-
release:
8-
types: [created, published, released]
99

1010

1111
jobs:
@@ -62,7 +62,7 @@ jobs:
6262
curl -X POST \
6363
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
6464
-H "Accept: application/vnd.github.v3+json" \
65-
https://api.github.com/repos/${{ github.repository }}/actions/workflows/delete-old-image.yml/dispatches \
65+
https://api.github.com/repos/${{ github.repository }}/actions/workflows/delete-old-image.yml \
6666
-d '{"ref": "main"}'
6767
6868

0 commit comments

Comments
 (0)