2024-08-14 14:56:45 +00:00
|
|
|
name: Docker build test
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
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:
|
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
|