Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Merge pull request #71 from presentium/main #47

Merge pull request #71 from presentium/main

Merge pull request #71 from presentium/main #47

name: Build Dockerfiles
on:
push:
branches:
- production
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
build-images:
runs-on: ubuntu-latest
name: Build and push custom Dockerfiles
strategy:
fail-fast: false
matrix:
image:
- { name: 'argocd', tag: 'v2.12.1', args: 'ARGOCD_VERSION=v2.12.1' }
- { name: 'terraform-actions', tag: 'v1.44.0', args: 'BASE_VERSION=v1.44.0' }
permissions:
contents: read
id-token: write
attestations: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
base: ${{ github.event.before }}
filters: |-
context:
- 'dockerfiles/${{ matrix.image.name }}.Dockerfile'
- '.github/workflows/build-dockerfiles.yml'
- name: Build image
if: github.event_name != 'push' || steps.changes.outputs.context == 'true'
uses: ./.github/actions/push-docker-image
with:
actor: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ env.REGISTRY }}
image-namespace: ${{ github.repository_owner }}
image-name: ${{ matrix.image.name }}
image-tag: ${{ matrix.image.tag }}
build-args: ${{ matrix.image.args }}