-
-
Notifications
You must be signed in to change notification settings - Fork 27
41 lines (41 loc) · 1.76 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
40
41
name: publish
on: [workflow_dispatch]
jobs:
publish-docker-image-main:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' # Running this job only for main branch
steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Publish Docker image for LATEST tag
run: |
docker build . -t ghcr.io/1zc/steamrt3-pterodactyl:latest -f docker/RT3-Dockerfile
docker push ghcr.io/1zc/steamrt3-pterodactyl:latest
- name: Build & Publish Docker image for BETA-LATEST tag
run: |
docker build . -t ghcr.io/1zc/steamrt3-pterodactyl:beta-latest -f docker/RT3Beta-Dockerfile
docker push ghcr.io/1zc/steamrt3-pterodactyl:beta-latest
publish-docker-image-dev:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/dev' # Running this job only for dev branch
steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Publish Docker image for DEV tag
run: |
docker build . -t ghcr.io/1zc/steamrt3-pterodactyl:dev -f docker/RT3-Dockerfile
docker push ghcr.io/1zc/steamrt3-pterodactyl:dev
- name: Build & Publish Docker image for BETA-DEV tag
run: |
docker build . -t ghcr.io/1zc/steamrt3-pterodactyl:beta-dev -f docker/RT3Beta-Dockerfile
docker push ghcr.io/1zc/steamrt3-pterodactyl:beta-dev