actions/.gitea/workflows/release.yaml

32 lines
927 B
YAML
Raw Normal View History

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:
2024-08-14 15:20:24 +00:00
- uses: docker/metadata-action@v5
id: meta
with:
images: ${{ vars.CONTAINER_REGISTRY }}/${{ gitea.repository }}
- uses: docker/login-action@v3
2024-08-14 14:56:45 +00:00
with:
2024-08-14 15:22:36 +00:00
registry: ksdfjsldkjfksldjf.io
2024-08-14 15:21:24 +00:00
username: test
password: test
2024-08-14 14:56:45 +00:00
- name: Push tags
shell: bash
env:
2024-08-14 15:20:24 +00:00
DOCKER_IMAGE: ${{ vars.CONTAINER_REGISTRY }}/${{ gitea.repository }}
2024-08-14 14:56:45 +00:00
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