Add multiarchitectuee dependencies #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: container-ci | |
on: | |
push: | |
branches: | |
- "main" | |
paths: | |
- "Dockerfile" | |
- ".github/workflows/container-ci.yml" | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
defaults: | |
run: | |
working-directory: "." | |
steps: | |
- name: Checkout GitHub Action | |
uses: actions/checkout@v3 | |
- name: Login to GitHub Container Registry (GHCR) | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name : Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: "docker/setup-buildx-action@v3" | |
- name: Extract Docker metadata | |
id: metadata | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/${{ github.repository }} | |
tags: | | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
type=ref,event=branch | |
type=sha | |
latest | |
- name: Build and push to GHCR | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
platforms: "linux/amd64,linux/arm64" | |
tags: ${{ steps.metadata.outputs.tags }} | |
labels: ${{ steps.metadata.outputs.labels }} |