-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.13 KB
/
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
38
39
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: |
git tag -l | xargs git tag -d
git tag "${{ github.ref_name }}" HEAD
docker build -t "ghcr.io/moddingx/reposilite-patches:latest" -t "ghcr.io/moddingx/reposilite-patches:${{ github.ref_name }}" --build-arg "VERSION=${{ 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"