Skip to content

update element (v1.11.75 -> v1.11.76); update prometheus (v2.54.0 -> … #17

update element (v1.11.75 -> v1.11.76); update prometheus (v2.54.0 -> …

update element (v1.11.75 -> v1.11.76); update prometheus (v2.54.0 -> … #17

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
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 }}
build-fresh:
name: Build ansible image (fresh)
needs: build-base
runs-on: self-hosted
if: ${{ github.ref == 'refs/heads/fresh' }}
steps:
- uses: actions/checkout@v4
- 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 }}
registry.etke.cc/${{ github.repository }}
tags: |
type=raw,value=fresh,enable=${{ github.ref_name == 'fresh' }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
context: .
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 }}
sync-images:
name: Sync images
needs: build-fresh
runs-on: self-hosted
if: ${{ github.ref == 'refs/heads/fresh' }}
container:
image: ghcr.io/${{ github.repository }}:fresh
steps:
- uses: actions/checkout@v4
- name: Sync images
env:
MATRIX_TOKEN: ${{ secrets.MATRIX_TOKEN }}
MATRIX_URL_FRESH: ${{ secrets.MATRIX_URL_FRESH }}
CI_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: |
apk --no-cache add skopeo parallel curl
skopeo login --username etkecc --password ${{ secrets.DOCKER_HUB_PASSWORD }} docker.io
cp -r /playbook/.config/inventory /
cd /playbook; ansible-playbook play/all.yml -l localhost -t skopeo -e target=localhost
sh play/.skopeo-parallel
./bin/ci-notify.sh
build-stable:
name: Build ansible image (stable)
runs-on: self-hosted
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- 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 }}
registry.etke.cc/${{ github.repository }}
tags: |
type=raw,value=latest,enable=${{ github.ref_name == 'main' }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
context: .
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 }}