Skip to content

feat: use an arm runner #8

feat: use an arm runner

feat: use an arm runner #8

Workflow file for this run

on:
push:
branches:
- main
permissions:
packages: write
contents: read
jobs:
build:
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout master
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
platforms: linux/arm64
push: true
tags: ghcr.io/apollorion/manifestsio:latest
- name: Build and push SHA-tagged image
uses: docker/build-push-action@v6
with:
platforms: linux/arm64
push: true
tags: ghcr.io/apollorion/manifestsio:${{ github.sha }}
- name: Checkout flux repository
uses: actions/checkout@v4
with:
repository: apollorion/flux
ssh-key: ${{ secrets.FLUX_DEPLOY_KEY }}
path: flux-repo
- name: Update deployment file in flux repo
run: |
sed -i 's|image: .*|image: ghcr.io/apollorion/manifestsio:${{ github.sha }}|' flux-repo/clusters/home/manifestsio/deployment.yaml
- name: Commit and push changes to flux repo
run: |
cd flux-repo
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add clusters/home/manifestsio/deployment.yaml
git commit -m "Update manifestsio image to ${{ github.sha }}" || exit 0
git push