Skip to content

feat: run every 6 hours, also using new arm runners and gh ubuntu-latest #3471

feat: run every 6 hours, also using new arm runners and gh ubuntu-latest

feat: run every 6 hours, also using new arm runners and gh ubuntu-latest #3471

name: Docker
on:
workflow_dispatch:
schedule:
- cron: "0 */6 * * *"
push:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ${{ matrix.arch == "amd64" && "ubuntu-latest" || "arm64" }}

Check failure on line 15 in .github/workflows/docker-publish.yml

View workflow run for this annotation

GitHub Actions / Docker

Invalid workflow file

The workflow is not valid. .github/workflows/docker-publish.yml (Line: 15, Col: 14): Unexpected symbol: '"amd64"'. Located at position 16 within expression: matrix.arch == "amd64" && "ubuntu-latest" || "arm64"
permissions:
contents: read
packages: write
strategy:
matrix:
branch: ["39", "40", "41", "rawhide", "el10"]
arch: ["amd64", "arm64"]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ !startsWith(matrix.branch, 'el') && 'f' || '' }}${{ matrix.branch }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2.2.1
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2.1.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v3.3.0
with:
context: .
platforms: linux/${{ matrix.arch }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:f${{ matrix.branch }}