49 lines
1.2 KiB
YAML
Executable File
49 lines
1.2 KiB
YAML
Executable File
name: Build Container
|
|
run-name: ${{ gitea.actor }} is pushing
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
env:
|
|
REGISTRY: gitea.haschek.at
|
|
IMAGE_NAME: ${{ gitea.repository }}
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- run: echo "🎉 Building ${{ gitea.repository }} because of a ${{ gitea.event_name }} event."
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: |
|
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
tags: |
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=semver,pattern={{major}}
|
|
type=sha
|
|
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.BUILD_TOKEN}}
|
|
|
|
- name: Build
|
|
uses: docker/build-push-action@v3
|
|
env:
|
|
ACTIONS_RUNTIME_TOKEN: ''
|
|
with:
|
|
context: .
|
|
file: docker/Dockerfile
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|