Skip to content

Commit

Permalink
fix: add support for multi-arch for Docker images (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pradumnasaraf authored Sep 17, 2024
1 parent c30c8ba commit 6c6b563
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name : Greetings
name : Greets Contributors

on:
fork:
Expand All @@ -15,10 +15,11 @@ on:

jobs:
welcome:
name: Welcome Message
if: github.actor != 'Pradumnasaraf'
name: Welcome Step
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: EddieHubCommunity/gh-action-community/src/welcome@main
with:
github-token: ${{ secrets.github_token }}
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/publish-dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,18 @@ jobs:
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build the Docker image
run: docker build . --file Dockerfile --tag ${{ secrets.DOCKERHUB_USERNAME }}/oswp:${{ steps.package-version.outputs.current-version}}

- name: Docker Push
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/oswp:${{ steps.package-version.outputs.current-version}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/oswp:latest
${{ secrets.DOCKERHUB_USERNAME }}/oswp:${{ steps.package-version.outputs.current-version}}
platforms: linux/amd64,linux/arm64,linux/arm/v7
7 changes: 6 additions & 1 deletion .github/workflows/publish-ghcr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Image - GHCR
name: Build and Push Image to GHCR

on:
workflow_dispatch:
Expand Down Expand Up @@ -37,12 +37,17 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/pradumnasaraf/oswp:${{ steps.package-version.outputs.current-version}}
ghcr.io/pradumnasaraf/oswp:latest
platforms: linux/amd64,linux/arm64,linux/arm/v7
labels: ${{ steps.meta.outputs.labels }}
3 changes: 2 additions & 1 deletion .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
with:
github-token: ${{ secrets.PA_TOKEN }}
version-file: 'package.json, package-lock.json'
skip-ci: 'false'
output-file: "false"
skip-commit: "true"
create-summary: 'true'

- name: create release
Expand Down

0 comments on commit 6c6b563

Please sign in to comment.