File tree Expand file tree Collapse file tree 3 files changed +22
-22
lines changed Expand file tree Collapse file tree 3 files changed +22
-22
lines changed Original file line number Diff line number Diff line change 1+ .dockerignore
2+ .github
3+ .README.md
Original file line number Diff line number Diff line change 77
88 cleanup-pg :
99 runs-on : ubuntu-latest
10+
1011 steps :
1112
1213 - name : Cleanup Docker images from GHCR
1314 uses : dataaxiom/ghcr-cleanup-action@v1
1415 with :
15- token : ${{ secrets.GITHUB_TOKEN }}
16- owner : ${{ github.repository_owner }}
17- repository : multi-repo/Postgres
16+ token : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
17+ owner : multi-repo
18+ repository : postgres
1819 keep-n-tagged : 1
19- package : multi-repo/Postgres /pg
20+ package : postgres /pg
2021 dry-run : false
Original file line number Diff line number Diff line change @@ -2,12 +2,9 @@ name: Build Docker Images
22
33on :
44 push :
5- branches :
6- - main
7- release :
8- types : [created, published, released]
9-
10-
5+ branches :
6+ - main
7+
118jobs :
129
1310 ghcr-build-pg :
@@ -52,22 +49,21 @@ jobs:
5249 IMAGE_NAME : " ${{ github.repository }}/pg"
5350
5451
55-
56- delete-old-images :
57- runs-on : ubuntu-latest
5852
59- steps :
60- - name : Trigger Delete Old Image Workflow
61- run : |
62- curl -X POST \
63- -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
64- -H "Accept: application/vnd.github.v3+json" \
65- https://api.github.com/repos/${{ github.repository }}/actions/workflows/delete-old-image.yml/dispatches \
66- -d '{"ref": "main"}'
53+ trigger-cleanup :
54+ uses : multi-repo/workflows/.github/workflows/clean-registry.yml@main
55+ with :
56+ owner : multi-repo
57+ repository : postgres
58+ package : postgres/pg
59+ keep_n_tagged : 2
60+ dry_run : true
61+ secrets :
62+ personal_access_token : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
6763
6864
6965 deploy :
70- needs : [delete-old-images , ghcr-build-pg]
66+ needs : [trigger-cleanup , ghcr-build-pg]
7167 runs-on : ubuntu-latest
7268 steps :
7369 - name : Deploy to environment
You can’t perform that action at this time.
0 commit comments