Skip to content

chore: Use dedicated runner for building ARM image to speed up the pr… #6

chore: Use dedicated runner for building ARM image to speed up the pr…

chore: Use dedicated runner for building ARM image to speed up the pr… #6

name: Publish example-restapi image
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
jobs:
publish:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
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: Build and push Docker image
uses: docker/build-push-action@v6
with:
push: true
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 }}