Skip to content

Commit 1f4deaa

Browse files
committed
Update build mechanism
1 parent 5c15925 commit 1f4deaa

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

.github/workflows/example-doc.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,34 @@ jobs:
2727
# updates to the templates. This workflow does not
2828
# push new images to dockerhub at all, hence why we
2929
# don't prefix this like openjournals/inara:<tag>
30-
- name: Build docker
31-
run: |
32-
docker build -t inara:edgiest .
30+
- name: Docker meta
31+
id: meta
32+
uses: docker/metadata-action@v5
33+
with:
34+
images: |
35+
openjournals/inara
36+
ghcr.io/openjournals/inara
37+
tags: |
38+
type=semver,pattern={{version}}
39+
type=edge
40+
type=ref,event=branch
41+
type=ref,event=pr
42+
43+
- name: Build image
44+
id: push
45+
uses: docker/build-push-action@v5
46+
with:
47+
context: "."
48+
push: false
49+
tags: ${{ steps.meta.outputs.tags }}
50+
labels: ${{ steps.meta.outputs.labels }}
3351

3452
- name: Build draft PDF
3553
run: >-
3654
docker run \
3755
--volume "$(pwd):/data" \
3856
--user "$(id -u):$(id -g)" \
39-
inara:edgiest \
57+
${{ fromJSON(steps.meta.outputs.json).tags[0] }} \
4058
-o "jats,contextpdf,crossref,preprint,tex,pdf" example/paper.md
4159
4260
- name: Upload draft PDF
@@ -56,7 +74,7 @@ jobs:
5674
docker run \
5775
--volume "$(pwd):/data" \
5876
--user "$(id -u):$(id -g)" \
59-
inara:edgiest \
77+
${{ fromJSON(steps.meta.outputs.json).tags[0] }} \
6078
-o "jats,contextpdf,crossref,preprint,tex,pdf" -p example/paper.md
6179
6280
- name: Upload production PDF

0 commit comments

Comments
 (0)