File tree 3 files changed +25
-22
lines changed
3 files changed +25
-22
lines changed Original file line number Diff line number Diff line change 6
6
- ' v*.*.*'
7
7
8
8
jobs :
9
- ghpackages :
10
-
11
- runs-on : ubuntu-20.04
12
-
13
- steps :
14
- - name : Checkout
15
- uses : actions/checkout@v2
16
- - name : Push to GitHub Packages
17
- uses : docker/build-push-action@v1
18
- with :
19
- username : ${{ github.actor }}
20
- password : ${{ github.token }}
21
- registry : docker.pkg.github.com
22
- repository : sile-typesetter/casile/casile
23
- tag_with_ref : true
24
-
25
- ghrelease :
26
-
27
- runs-on : ubuntu-20.04
28
9
10
+ ghpublish :
11
+ runs-on : ubuntu-latest
29
12
steps :
30
13
- name : Checkout
31
14
uses : actions/checkout@v2
@@ -47,11 +30,20 @@ jobs:
47
30
name : casile-${{ env.VERSION }}
48
31
path : casile*-${{ env.VERSION }}.zip
49
32
- name : Publish Release
50
- uses : softprops/action-gh-release@v0.1.5
33
+ uses : softprops/action-gh-release@v1
51
34
with :
52
35
body_path : casile-${{ env.VERSION }}.md
53
36
files : |
54
37
casile-${{ env.VERSION }}.zip
55
38
casile-${{ env.VERSION }}.tar.xz
56
39
env :
57
40
GITHUB_TOKEN : ${{ github.token }}
41
+ - name : Publish Docker Image to GH Pakcages
42
+ run : |
43
+ make docker-build-push
44
+ env :
45
+ DOCKER_REGISTRY : docker.pkg.github.com
46
+ DOCKER_REPO : $GITHUB_REPOSITORY/casile
47
+ DOCKER_TAG : ${{ env.VERSION }}
48
+ DOCKER_USERNAME : ${{ github.actor }}
49
+ DOCKER_PASSWORD : ${{ github.token }}
Original file line number Diff line number Diff line change @@ -209,6 +209,17 @@ casile-%.md: CHANGELOG.md
209
209
sed -e ' /\.\.\.v$*/,/\.\.\.v/!d' $< | \
210
210
sed -e ' 1,3d;N;$$!P;$$!D;$$d' > $@
211
211
212
+ export DOCKER_REGISTRY ?= docker.io
213
+ export DOCKER_REPO ?= siletypesetter/$(_casile )
214
+ export DOCKER_TAG ?= HEAD
215
+
212
216
.PHONY : docker
213
217
docker : Dockerfile hooks/build .version
214
- IMAGE_NAME=siletypesetter/$(_casile ) :HEAD ./hooks/build $(VERSION )
218
+ ./hooks/build $(VERSION )
219
+ docker tag $(DOCKER_REPO ) :$(DOCKER_TAG ) $(DOCKER_REGISTRY ) /$(DOCKER_REPO ) :$(DOCKER_TAG )
220
+
221
+
222
+ .PHONY : docker-build-push
223
+ docker-build-push : docker
224
+ docker login https://$(DOCKER_REGISTRY ) -u $(DOCKER_USERNAME )
225
+ docker push $(DOCKER_REGISTRY ) /$(DOCKER_REPO ) :$(DOCKER_TAG )
Original file line number Diff line number Diff line change @@ -22,5 +22,5 @@ docker build \
22
22
--build-arg VCS_REF=" ${1:- $DESC } " \
23
23
--build-arg RUNTIME_DEPS=" $RUNTIME_DEPS " \
24
24
--build-arg BUILD_DEPS=" $BUILD_DEPS " \
25
- --tag $IMAGE_NAME \
25
+ --tag $DOCKER_REPO : $DOCKER_TAG \
26
26
./
You can’t perform that action at this time.
0 commit comments