@@ -17,15 +17,26 @@ jobs:
1717 steps :
1818 - name : Checkout source
1919 uses : actions/checkout@v3
20- - name : Login to Docker Hub
20+ - name : Login to DockerHub
2121 run : docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
2222 env :
2323 DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
2424 DOCKER_USERNAME : ${{ secrets.DOCKER_USERNAME }}
25- - name : Build
26- run : make build-latest config=public
27- - name : Push
28- run : make push-latest config=public
25+ - name : Build and push to DockerHub
26+ run : |
27+ make build-latest config=dockerhub
28+ make push-latest config=dockerhub
29+ - name : Login to GitHub Container Registry
30+ # v2.2.0
31+ uses : docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
32+ with :
33+ registry : ghcr.io
34+ username : ${{ github.repository_owner }}
35+ password : ${{ secrets.GITHUB_TOKEN }}
36+ - name : Build and push to GitHub Container Registry
37+ run : |
38+ make build-latest config=public
39+ make push-latest config=public
2940 - name : Send alert on failure
3041 if : ${{ failure() }}
3142 uses : zulip/github-actions-zulip/send-message@b62d5a0e48a4d984ea4fce5dd65ba691963d4db4
4556 - name : Checkout source
4657 uses : actions/checkout@v3
4758 - name : Login to GitHub Container Registry
48- uses : docker/login-action@v1
59+ # v2.2.0
60+ uses : docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
4961 with :
5062 registry : ghcr.io
5163 username : ${{ github.repository_owner }}
@@ -68,11 +80,11 @@ jobs:
6880 topic : ${{ github.repository }} scheduled job failure
6981 content : ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed.
7082
71- prune-untagged-images :
83+ prune-untagged-public- images :
7284 needs :
73- - rebuild-private -latest-image
85+ - rebuild-public -latest-image
7486
75- name : Prune untagged images
87+ name : Prune untagged public images
7688 runs-on : ubuntu-latest
7789 steps :
7890 - name : Prune
@@ -94,3 +106,30 @@ jobs:
94106 type : stream
95107 topic : ${{ github.repository }} scheduled job failure
96108 content : ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed.
109+
110+ prune-untagged-private-images :
111+ needs :
112+ - rebuild-private-latest-image
113+
114+ name : Prune untagged private images
115+ runs-on : ubuntu-latest
116+ steps :
117+ - name : Prune
118+ # v4.1.1
119+ uses : actions/delete-package-versions@0d39a63126868f5eefaa47169615edd3c0f61e20
120+ with :
121+ package-name : ' library-documentation-action-v2-insiders'
122+ package-type : ' container'
123+ min-versions-to-keep : 1
124+ delete-only-untagged-versions : ' true'
125+ - name : Send alert on failure
126+ if : ${{ failure() }}
127+ uses : zulip/github-actions-zulip/send-message@b62d5a0e48a4d984ea4fce5dd65ba691963d4db4
128+ with :
129+ api-key : ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_API_KEY }}
130+ email : ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_EMAIL }}
131+ organization-url : ' https://ponylang.zulipchat.com/'
132+ to : notifications
133+ type : stream
134+ topic : ${{ github.repository }} scheduled job failure
135+ content : ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed.
0 commit comments