Skip to content

Commit

Permalink
Merge pull request #42 from 1zc/dev
Browse files Browse the repository at this point in the history
New publish workflows for separate beta images
  • Loading branch information
1zc authored Apr 1, 2024
2 parents 8bbc17a + e0b85aa commit 27c2c0a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 8 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ jobs:
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
Expand All @@ -35,7 +31,3 @@ jobs:
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
33 changes: 33 additions & 0 deletions .github/workflows/publish_beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: publish_beta
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 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 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
5 changes: 5 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'`
if [ ! -z ${SRCDS_APPID} ]; then
if [ ${SRCDS_STOP_UPDATE} -eq 0 ]; then
STEAMCMD=""
echo "Starting SteamCMD for AppID: ${SRCDS_APPID}"
if [ ! -z ${SRCDS_BETAID} ]; then
if [ ! -z ${SRCDS_BETAPASS} ]; then
if [ ${SRCDS_VALIDATE} -eq 1 ]; then
echo "SteamCMD Validate Flag Enabled! Triggered install validation for AppID: ${SRCDS_APPID}"
echo "THIS MAY WIPE CUSTOM CONFIGURATIONS! Please stop the server if this was not intended."
if [ ! -z ${SRCDS_LOGIN} ]; then
STEAMCMD="./steamcmd/steamcmd.sh +login ${SRCDS_LOGIN} ${SRCDS_LOGIN_PASS} +force_install_dir /home/container +app_update ${SRCDS_APPID} -beta ${SRCDS_BETAID} -betapassword ${SRCDS_BETAPASS} validate +quit"
else
Expand Down Expand Up @@ -40,6 +43,8 @@ if [ ! -z ${SRCDS_APPID} ]; then
fi
else
if [ ${SRCDS_VALIDATE} -eq 1 ]; then
echo "SteamCMD Validate Flag Enabled! Triggered install validation for AppID: ${SRCDS_APPID}"
echo "THIS MAY WIPE CUSTOM CONFIGURATIONS! Please stop the server if this was not intended."
if [ ! -z ${SRCDS_LOGIN} ]; then
STEAMCMD="./steamcmd/steamcmd.sh +login ${SRCDS_LOGIN} ${SRCDS_LOGIN_PASS} +force_install_dir /home/container +app_update ${SRCDS_APPID} validate +quit"
else
Expand Down

0 comments on commit 27c2c0a

Please sign in to comment.