add tag only
This commit is contained in:
parent
5c7e51ed37
commit
6f1dd7ced7
@ -1,19 +0,0 @@
|
||||
name: Docker build test
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
password:
|
||||
description: "Password or personal access token used to log against the Docker registry"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ startsWith(gitea.ref, 'refs/tags/v') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/metadata-action@v5
|
||||
id: meta
|
||||
with:
|
||||
images: ${{ vars.CONTAINER_REGISTRY }}/${{ gitea.repository }}
|
32
.gitea/workflows/releases.yaml
Normal file
32
.gitea/workflows/releases.yaml
Normal file
@ -0,0 +1,32 @@
|
||||
name: Docker build test
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
password:
|
||||
description: "Password or personal access token used to log against the Docker registry"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ startsWith(gitea.ref, 'refs/tags/v') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/metadata-action@v5
|
||||
id: meta
|
||||
with:
|
||||
images: ${{ vars.CONTAINER_REGISTRY }}/${{ gitea.repository }}
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.CONTAINER_REGISTRY }}
|
||||
username: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.password }}
|
||||
- name: Push tags
|
||||
shell: bash
|
||||
env:
|
||||
DOCKER_IMAGE: ${{ vars.CONTAINER_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
|
Loading…
x
Reference in New Issue
Block a user