Skip to content

feat: publish arm64 Docker image as well #11

feat: publish arm64 Docker image as well

feat: publish arm64 Docker image as well #11

name: Publish example-restapi image
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
jobs:
Publish:
name: Publish example-restapi image
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
provenance: false
tags: ghcr.io/nordic-institute/xrddev-example-restapi:latest
- name: Clean old images
uses: snok/container-retention-policy@v2
with:
image-names: xrddev-example-restapi
cut-off: 1 week ago UTC
timestamp-to-use: created_at
account-type: org
org-name: nordic-institute
keep-at-least: 1
token-type: github-token
token: ${{ secrets.GITHUB_TOKEN }}