gecho/.gitea/workflows/build-and-push.yaml
2023-09-01 09:47:49 +02:00

32 lines
821 B
YAML

name: Build Image using Dockerfile
on:
push:
branches:
- main
jobs:
build:
name: Build image
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date '+%Y-%m-%dT%TZ%z')"
- uses: actions/checkout@v3
- uses: docker/metadata-action@v3
id: metadata
with:
images: git.thebarrens.nu/${{ gitea.repository}}
- uses: docker/login-action@v2
with:
registry: git.thebarrens.nu
username: ${{ gitea.actor }}
password: ${{ secrets.GITEA_TOKEN }}
- uses: int128/kaniko-action@v1
with:
push: true
tags: latest
labels: ${{ steps.metadata.outputs.labels }}
cache: false
build-args: |
BUILD_DATE: ${{ steps.date.outputs.date }}