ci: publish docker image on tags
Some checks failed
Publish Docker image / publish (push) Failing after 11s
Some checks failed
Publish Docker image / publish (push) Failing after 11s
This commit is contained in:
parent
8e52fafcfa
commit
b332b26752
1 changed files with 41 additions and 0 deletions
41
.forgejo/workflows/docker-image.yml
Normal file
41
.forgejo/workflows/docker-image.yml
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
name: Publish Docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: forge.lclr.dev
|
||||||
|
IMAGE_NAME: thibaud-lclr/api-client
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: docker
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to Forgejo registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ secrets.FORGEJO_REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.FORGEJO_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push image
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: prod.Dockerfile
|
||||||
|
target: aio
|
||||||
|
push: true
|
||||||
|
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
|
||||||
|
labels: |
|
||||||
|
org.opencontainers.image.source=https://${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
org.opencontainers.image.revision=${{ github.sha }}
|
||||||
|
org.opencontainers.image.version=${{ github.ref_name }}
|
||||||
Loading…
Reference in a new issue