Skip to content

Commit

Permalink
feat: add support to docker multi-platform
Browse files Browse the repository at this point in the history
  • Loading branch information
UlisesGascon committed Dec 19, 2024
1 parent 3f24eb1 commit 0e9fdf7
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/docker-publish-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ on:
types:
- published

permissions:
contents: read
packages: write

jobs:
build-and-push:
name: Build and Push Docker Image
name: Build and Push Multi-Platform Docker Image
runs-on: ubuntu-latest

steps:
Expand All @@ -23,17 +27,26 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true

- name: Set Lowercase Repository Info
id: repo_info
run: |
echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "REPO_NAME=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Build and Push Docker Image
- name: Build and Push Multi-Platform Docker Image
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/${{ github.repository }}/fortsphere:latest
ghcr.io/${{ github.repository }}/fortsphere:${{ github.event.release.tag_name }}
ghcr.io/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}:latest
ghcr.io/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}:${{ github.event.release.tag_name }}
labels: |
org.opencontainers.image.title=Fortsphere
org.opencontainers.image.title=fortsphere
org.opencontainers.image.description="Fortify your digital sphere, one command at a time."
org.opencontainers.image.url=https://github.com/OpenPathfinder/fortSphere
org.opencontainers.image.source=https://github.com/OpenPathfinder/fortSphere.git
Expand Down

0 comments on commit 0e9fdf7

Please # to comment.