Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Upgrade image build process for multi-architecture support #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
28 changes: 21 additions & 7 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,25 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Build image
run: docker image build -f Containerfile --tag ghcr.io/vanilla-os/differ:main .
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

- name: Publish image
if: github.repository == 'Vanilla-OS/Differ' && github.ref == 'refs/heads/main'
run: |
docker login ghcr.io -u ${{ env.REGISTRY_USER }} -p ${{ env.REGISTRY_PASSWORD }}
docker image push "ghcr.io/vanilla-os/differ:main"
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v5
with:
provenance: false
context: .
file: Containerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.repository == 'Vanilla-OS/Differ' && github.ref == 'refs/heads/main' }}
tags: ghcr.io/vanilla-os/differ:main