File tree 1 file changed +37
-0
lines changed
1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Containers
2
+
3
+ on :
4
+ push :
5
+ pull_request :
6
+ workflow_dispatch :
7
+ schedule :
8
+ - cron : ' 0 0 * * 0' # weekly
9
+
10
+ jobs :
11
+
12
+ Image :
13
+ runs-on : ubuntu-latest
14
+ env :
15
+ DOCKER_BUILDKIT : 1
16
+ steps :
17
+
18
+ - name : 🧰 Repository Checkout
19
+ uses : actions/checkout@v2
20
+
21
+ - name : 🔧 Generate image name
22
+ id : generate
23
+ run : |
24
+ REPO='${{ github.repository }}'
25
+ echo "::set-output name=image::ghcr.io/${REPO,,}/ubuntu/focal/build"
26
+
27
+ - name : ⛴️ Build container image
28
+ run : docker build -t ${{ steps.generate.outputs.image }} -f Dockerfile .
29
+
30
+ - name : 🛰️ Push container image
31
+ if : github.event_name != 'pull_request'
32
+ uses : pyTooling/Actions/with-post-step@r0
33
+ with :
34
+ main : |
35
+ echo '${{ github.token }}' | docker login ghcr.io -u GitHub-Actions --password-stdin
36
+ docker push ${{ steps.generate.outputs.image }}
37
+ post : docker logout ghcr.io
You can’t perform that action at this time.
0 commit comments