Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Workflow file for this run

name: Build and Push Images
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Index.html
run: |
export COLOR=$(openssl rand -hex 3)
export BUILD=$(date +%F-%H-%M)
envsubst '${COLOR},${BUILD}' < image/index.html.tmp > image/index.html
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to in-cluster Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
context: image
file: image/Dockerfile
tags: ghcr.io/procinger/kargo-demo:1.${{ github.run_number }}.${{ github.run_attempt }}
platforms: linux/amd64,linux/arm64
push: true