Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .github/workflows/docker-build-and-push-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,28 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Get short SHA
id: slug
run: echo "GIT_SHORT_SHA7=$(echo ${GITHUB_SHA} | cut -c1-7)" >> "$GITHUB_OUTPUT"

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
jammsen/palworld-dedicated-server
${{ secrets.DOCKERHUB_USERNAME }}/palworld-dedicated-server
ghcr.io/${{ github.repository }}

- name: Get short SHA
id: slug
run: echo "GIT_SHORT_SHA7=$(echo ${GITHUB_SHA} | cut -c1-7)" >> "$GITHUB_OUTPUT"
tags: |
type=ref,event=branch
type=raw,value=${{ steps.slug.outputs.GIT_SHORT_SHA7 }}

- name: Build the images
uses: docker/build-push-action@v5
with:
context: .
push: false
load: true
tags: |
${{ steps.meta.outputs.tags }}
${{ secrets.DOCKERHUB_USERNAME }}/palworld-dedicated-server:${{ steps.slug.outputs.GIT_SHORT_SHA7 }}
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/docker-palworld-dedicated-server:${{ steps.slug.outputs.GIT_SHORT_SHA7 }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Run unit tests
Expand All @@ -67,8 +67,5 @@ jobs:
with:
context: .
push: true
tags: |
${{ steps.meta.outputs.tags }}
${{ secrets.DOCKERHUB_USERNAME }}/palworld-dedicated-server:${{ steps.slug.outputs.GIT_SHORT_SHA7 }}
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/docker-palworld-dedicated-server:${{ steps.slug.outputs.GIT_SHORT_SHA7 }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
31 changes: 13 additions & 18 deletions .github/workflows/docker-build-and-push-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,30 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Get short SHA
id: slug
run: echo "GIT_SHORT_SHA7=$(echo ${GITHUB_SHA} | cut -c1-7)" >> "$GITHUB_OUTPUT"

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
jammsen/palworld-dedicated-server
${{ secrets.DOCKERHUB_USERNAME }}/palworld-dedicated-server
ghcr.io/${{ github.repository }}

- name: Get short SHA
id: slug
run: echo "GIT_SHORT_SHA7=$(echo ${GITHUB_SHA} | cut -c1-7)" >> "$GITHUB_OUTPUT"
tags: |
type=ref,event=branch
type=ref,event=tag
type=raw,value=${{ steps.slug.outputs.GIT_SHORT_SHA7 }}
type=raw,value=latest

- name: Build the images
uses: docker/build-push-action@v5
with:
context: .
push: false
load: true
tags: |
${{ steps.meta.outputs.tags }}
${{ secrets.DOCKERHUB_USERNAME }}/palworld-dedicated-server:${{ steps.slug.outputs.GIT_SHORT_SHA7 }}
${{ secrets.DOCKERHUB_USERNAME }}/palworld-dedicated-server:latest
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/docker-palworld-dedicated-server:${{ steps.slug.outputs.GIT_SHORT_SHA7 }}
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/docker-palworld-dedicated-server:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Run unit tests
Expand All @@ -69,19 +69,14 @@ jobs:
with:
context: .
push: true
tags: |
${{ steps.meta.outputs.tags }}
${{ secrets.DOCKERHUB_USERNAME }}/palworld-dedicated-server:${{ steps.slug.outputs.GIT_SHORT_SHA7 }}
${{ secrets.DOCKERHUB_USERNAME }}/palworld-dedicated-server:latest
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/docker-palworld-dedicated-server:${{ steps.slug.outputs.GIT_SHORT_SHA7 }}
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/docker-palworld-dedicated-server:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: jammsen//palworld-dedicated-server
repository: ${{ secrets.DOCKERHUB_USERNAME }}//palworld-dedicated-server
readme-filepath: ./README.md
enable-url-completion: true
Loading