-
Notifications
You must be signed in to change notification settings - Fork 4
61 lines (55 loc) · 2 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Deploy
on: [ push, workflow_dispatch ]
jobs:
affected:
uses: sile-typesetter/.github/.github/workflows/list_affected_rockspecs.yml@master
build:
needs: affected
if: ${{ needs.affected.outputs.rockspecs }}
uses: sile-typesetter/.github/.github/workflows/test_build_rock.yml@master
with:
rockspecs: ${{ needs.affected.outputs.rockspecs }}
upload:
needs: [ affected, build ]
# Only run upload if:
# 1. We are on the canonical repository (no uploads from forks)
# 2. The current commit is either tagged or on the default branch (the workflow will upload dev/scm rockspecs any
# time they are touched, tagged ones whenever the edited rockspec and tag match)
# 3. Some rockspecs were changed — this implies the commit changing the rockspec is the same one that gets tagged
if: >-
${{
github.repository == 'sile-typesetter/fontproof' &&
( github.ref_name == 'master' || startsWith(github.ref, 'refs/tags/') ) &&
needs.affected.outputs.rockspecs
}}
uses: sile-typesetter/.github/.github/workflows/upload_to_luarocks.yml@master
with:
rockspecs: ${{ needs.affected.outputs.rockspecs }}
secrets:
apikey: ${{ secrets.LUAROCKS_SILETYPESETTER }}
ghcr:
if: >-
${{
github.repository == 'sile-typesetter/fontproof' &&
( github.ref_name == 'master' || startsWith(github.ref, 'refs/tags/') )
}}
strategy:
fail-fast: false
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch tags
run: |
git fetch --prune --tags ||:
- name: Publish Docker Image to GH Container Registry
run: |
make docker-build-push
env:
DOCKER_REGISTRY: ghcr.io
DOCKER_REPO: ${{ github.repository }}
DOCKER_TAG: ${{ github.ref_name }}
DOCKER_USERNAME: ${{ github.actor }}
DOCKER_PAT: ${{ secrets.CR_SILE_TYPESETTER }}