hackertours/.forgejo/workflows/image.yaml
Stefan Bethke 19ee1219bb
All checks were successful
/ build (push) Successful in 21s
need recursive submodule checkout for themes
2024-09-26 16:49:31 +02:00

36 lines
No EOL
1.1 KiB
YAML

on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run hugo
run: docker run --rm -it -v ${{ github.workspace }}:/src docker.io/hugomods/hugo:latest hugo
- name: Compute Image Metadata
uses: docker/metadata-action@v5
id: metadata
with:
images: git.hamburg.ccc.de/${{ github.repository }}/hackertours
tags: |
type=raw,value=latest,enable={{is_default_branch}}
- name: Log in to Image Registry
uses: docker/login-action@v3
with:
registry: git.hamburg.ccc.de
username: ${{ github.actor }}
password: ${{ secrets.REPO_TOKEN }}
- name: Build image with kaniko
uses: https://github.com/int128/kaniko-action@v1
with:
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
cache: true
cache-repository: git.hamburg.ccc.de/${{ github.repository }}/cache