@@ -17,15 +17,26 @@ jobs:
17
17
steps :
18
18
- name : Checkout source
19
19
uses : actions/checkout@v3
20
- - name : Login to Docker Hub
20
+ - name : Login to DockerHub
21
21
run : docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
22
22
env :
23
23
DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
24
24
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
29
40
- name : Send alert on failure
30
41
if : ${{ failure() }}
31
42
uses : zulip/github-actions-zulip/send-message@b62d5a0e48a4d984ea4fce5dd65ba691963d4db4
45
56
- name : Checkout source
46
57
uses : actions/checkout@v3
47
58
- name : Login to GitHub Container Registry
48
- uses : docker/login-action@v1
59
+ # v2.2.0
60
+ uses : docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
49
61
with :
50
62
registry : ghcr.io
51
63
username : ${{ github.repository_owner }}
@@ -68,11 +80,11 @@ jobs:
68
80
topic : ${{ github.repository }} scheduled job failure
69
81
content : ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed.
70
82
71
- prune-untagged-images :
83
+ prune-untagged-public- images :
72
84
needs :
73
- - rebuild-private -latest-image
85
+ - rebuild-public -latest-image
74
86
75
- name : Prune untagged images
87
+ name : Prune untagged public images
76
88
runs-on : ubuntu-latest
77
89
steps :
78
90
- name : Prune
@@ -94,3 +106,30 @@ jobs:
94
106
type : stream
95
107
topic : ${{ github.repository }} scheduled job failure
96
108
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