From c87225ac16608a404eadbf0cd0a2d72f47e86145 Mon Sep 17 00:00:00 2001 From: Jacob McSwain Date: Sat, 10 Feb 2024 15:21:48 -0600 Subject: [PATCH 1/2] feat: Release to GHCR This is a squash containing: fix: ci: merge GHCR+Docker Hub developer image workflow ci: release: combine GHCR and DockerHub releases --- .../{docker-hub.yml => developer.yml} | 22 +++++++++++++++++-- .github/workflows/release.yml | 19 ++++++++++++---- 2 files changed, 35 insertions(+), 6 deletions(-) rename .github/workflows/{docker-hub.yml => developer.yml} (71%) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/developer.yml similarity index 71% rename from .github/workflows/docker-hub.yml rename to .github/workflows/developer.yml index 9e9a7c957..429c34f18 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/developer.yml @@ -17,11 +17,20 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Docker - GHCR Login + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Docker - Metadata id: meta uses: docker/metadata-action@v5 with: - images: ${{ github.repository }} + images: | + ${{ github.repository }} + ghcr.io/${{ github.repository }} tags: type=raw,value=dev flavor: latest=false @@ -50,11 +59,20 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Docker - GHCR Login + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Docker - Metadata id: meta uses: docker/metadata-action@v5 with: - images: ${{ github.repository }} + images: | + ${{ github.repository }} + ghcr.io/${{ github.repository }} tags: type=raw,value=dev-arm64 flavor: latest=false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd41022f3..3e9f8cecc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ on: # yamllint disable-line rule:truthy types: [published] jobs: - # Builds the Dockerfile and pushes it to dockerhub + # Builds the Dockerfile and pushes it to dockerhub and GHCR release-amd64: name: Release - Docker image runs-on: ubuntu-latest @@ -19,11 +19,20 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Docker - GHCR Login + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Docker - Metadata id: meta uses: docker/metadata-action@v5 with: - images: ${{ github.repository }} + images: | + ${{ github.repository }} + ghcr.io/${{ github.repository }} # generate Docker tags based on the following events/attributes tags: | type=semver,pattern=v{{version}} @@ -39,7 +48,7 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} - # Builds the Dockerfile.arm64 and pushes it to dockerhub + # Builds the Dockerfile.arm64 and pushes it to dockerhub and GHCR release-arm64: name: Release - Docker image runs-on: ubuntu-latest @@ -63,7 +72,9 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ github.repository }} + images: | + ${{ github.repository }} + ghcr.io/${{ github.repository }} # generate Docker tags based on the following events/attributes tags: | type=semver,pattern=v{{version}}-arm64 From a7af4008d76dbf6b89543a42db43714e2b7168ff Mon Sep 17 00:00:00 2001 From: Jacob McSwain Date: Sat, 10 Feb 2024 15:27:11 -0600 Subject: [PATCH 2/2] Add GHCR badge to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f92c88a65..28152cab2 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ [![Discord](https://img.shields.io/discord/1200397673329594459?logo=discord&label=Discord&link=https%3A%2F%2Fdiscord.gg%2FUxBxStPAAE)](https://discord.com/invite/UxBxStPAAE) [![Docker Hub](https://img.shields.io/badge/Docker_Hub-palworld-blue?logo=docker)](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) +[![GHCR](https://img.shields.io/badge/GHCR-palworld-blue?logo=docker)](https://github.com/thijsvanloef/palworld-server-docker/pkgs/container/palworld-server-docker) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/palworld)](https://artifacthub.io/packages/search?repo=palworld) [Chat with the community on Discord](https://discord.gg/UxBxStPAAE)