-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1021 Bytes
/
publish.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
name: 'Build'
on:
create:
branches:
- 'master'
jobs:
deploy:
if: startsWith(github.repository, 'ModdingX/') # don't run in forks
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v3
with:
submodules: true
- name: 'Apply patches'
run: ./gradlew applyPatches
- name: 'Build container'
shell: bash
working-directory: target
run: |
docker build -t "ghcr.io/ModdingX/reposilite-patches:latest" -t "ghcr.io/ModdingX/reposilite-patches:${github.ref_name}" .
- name: 'Login to GitHub package registry'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 'Publish container'
shell: bash
run: |
docker push "ghcr.io/ModdingX/reposilite-patches:${github.ref_name}"
docker push "ghcr.io/ModdingX/reposilite-patches:latest"