paste code generated with chatgpt
This commit is contained in:
40
.gitea/workflows/dockerimage.yaml
Normal file
40
.gitea/workflows/dockerimage.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
# template source: https://github.com/bretfisher/docker-build-workflow/blob/main/templates/call-docker-build.yaml
|
||||
name: Docker Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'argocd/**'
|
||||
# cancel any previously-started, yet still active runs of this workflow on the same branch
|
||||
concurrency:
|
||||
group: ${{ github.ref }}-${{ github.workflow }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-and-push-image:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: gitea.arcodange.duckdns.org
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.PACKAGES_TOKEN }}
|
||||
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build and push image to Gitea Container Registry
|
||||
run: |-
|
||||
TAGS="latest ${{ github.ref_name }}"
|
||||
docker build -t app .
|
||||
for TAG in $TAGS; do
|
||||
docker tag app gitea.arcodange.duckdns.org/${{ github.repository }}:$TAG
|
||||
docker push gitea.arcodange.duckdns.org/${{ github.repository }}:$TAG
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user