net-base/.gitea/workflows/action.yaml
David Claeys b2ea502343
All checks were successful
Build docker container / build (release) Successful in 51s
update dockerfile and action
2025-04-01 16:06:12 +02:00

54 lines
1.8 KiB
YAML

name: 'Build docker container'
on:
release:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ GITHUB_WORKSPACE }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Docker
run: |
echo "Checking docker installation"
if command -v docker &> /dev/null; then
echo "Docker installation found"
else
echo "Docker installation not found. Docker will be installed"
curl -fsSL https://get.docker.com | sh
fi
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: Docker login
uses: https://github.com/docker/login-action@v3
with:
registry: git.claeyscloud.com
username: nologin
password: ${{ secrets.PACKAGE_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
labels: |
org.opencontainers.image.documentation=https://git.claeyscloud.com/david/epg-info-docker/src/branch/main/README.md
images: |
git.claeyscloud.com/david/net-base
tags: |
type=semver,pattern={{raw}}
type=sha
type=semver,pattern={{version}}
- name: Generate random password for certificate
id: password
run:
echo "secret=$(openssl rand -base64 12)" >> $GITHUB_OUTPUT
- name: Build and push
uses: https://github.com/docker/build-push-action@v5
with:
build-args: CERT_PASSWORD=${{ steps.password.outputs.secret }}
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}