Skip to content

fix ci

fix ci #4

Workflow file for this run

name: CI
on:
push:
branches: [ "main", "fresh" ]
env:
agru: "v0.1.12"
alpine: "3.20"
ansible: "10.3.0"
ansible_core: "2.17.3"
permissions:
checks: write
contents: write
packages: write
pull-requests: read
jobs:
build-base:
name: Build base image
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/fresh' }}
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}/base
tags: |
type=raw,value=${{ env.alpine }}-${{ env.ansible_core }}-${{ env.ansible }},enable=${{ github.ref_name == 'fresh' }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
context: .
file: ./Dockerfile.base
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
AGRU=${{ env.agru }}
ALPINE=${{ env.alpine }}
ANSIBLE=${{ env.ansible }}
ANSIBLE_CORE=${{ env.ansible_core }}