actions/.gitea/workflows/release.yaml

36 lines
1.2 KiB
YAML
Raw Normal View History

2024-08-14 14:56:45 +00:00
name: Docker build test
on:
workflow_call:
2024-08-14 15:05:17 +00:00
inputs:
registry:
description: "Server address of Docker registry."
default: ${{ vars.CONTAINER_REGISTRY }}
username:
description: "Username used to log against the Docker registry"
default: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
2024-08-14 15:08:29 +00:00
secrets:
2024-08-14 15:05:17 +00:00
password:
description: "Password or personal access token used to log against the Docker registry"
required: true
2024-08-14 14:56:45 +00:00
jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ startsWith(gitea.ref, 'refs/tags/v') }}
steps:
- uses: https://gitea.okami101.io/okami101/actions/docker@main
with:
registry: ${{ inputs.registry }}
username: ${{ inputs.username }}
2024-08-14 15:08:29 +00:00
password: ${{ secrets.password }}
2024-08-14 14:56:45 +00:00
- name: Push tags
shell: bash
if: ${{ startsWith(gitea.ref, 'refs/tags/v') }}
env:
DOCKER_IMAGE: ${{ inputs.registry }}/${{ gitea.repository }}
run: |
docker tag $DOCKER_IMAGE:main $DOCKER_IMAGE:latest
docker tag $DOCKER_IMAGE:main $DOCKER_IMAGE:${{ steps.meta.outputs.version }}
docker push -a $DOCKER_IMAGE