Files
nginx-unit/.gitea/workflows/build-amd64.yml
2024-12-11 21:54:55 +02:00

53 lines
1.3 KiB
YAML

name: Build AMD64
on:
workflow_call:
inputs:
python-version:
required: true
type: string
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
jobs:
build:
runs-on: linux_amd
container:
image: catthehacker/ubuntu:act-latest
env:
RUNNER_TOOL_CACHE: /toolcache
steps:
- name: Checkout
uses: actions/checkout@v4
with:
github-server-url: https://gitea.technocloud.ee
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: gitea.technocloud.ee
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Meta
id: meta
run: |
echo "REPO_NAME=${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT
- name: Build and Push AMD64
id: build-docker
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.python${{ inputs.python-version }}
platforms: linux/amd64
push: true
provenance: false
outputs: type=image,name=gitea.technocloud.ee/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true