fix deployment
All checks were successful
test / docker (push) Successful in 18s
ci / docker (pull_request) Successful in 17s

This commit is contained in:
OCram85 2023-07-11 10:29:48 +02:00
parent 5e1cf5bcd1
commit 032381c0c7
3 changed files with 52 additions and 61 deletions

View File

@ -1,23 +1,34 @@
name: ci name: ci
run-name: docker pipeline
on: on:
push: push:
branches: [ '*' ] branches:
tags-ignore: [ '*' ] - 'main'
tags:
- 'v*'
pull_request: pull_request:
branches: [ main ] branches:
- 'main'
jobs: jobs:
test-build: docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: catthehacker/ubuntu:act-latest image: catthehacker/ubuntu:act-latest
steps: steps:
#- -
# name: Set up QEMU name: Docker meta
# uses: actions/setup-qemu-action@v2 id: meta
uses: actions/metadata-action@v4
with:
images: |
gitea.ocram85.com/ocram85/swarmproxy
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: actions/setup-buildx-action@v2 uses: actions/setup-buildx-action@v2
@ -33,5 +44,6 @@ jobs:
name: Build and push name: Build and push
uses: actions/build-push-action@v4 uses: actions/build-push-action@v4
with: with:
push: false push: ${{ github.event_name != 'pull_request' }}
tags: gitea.ocram85.com/ocram85/swarmproxy:next tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -1,50 +0,0 @@
name: deployment
run-name: tag based container build and push
on:
push:
branches:
- 'master'
tags:
- 'v*'
jobs:
deployment-job:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
-
name: Docker meta
id: meta
uses: actions/metadata-action@v4
with:
images: |
gitea.ocram85.com/ocram85/swarmproxy
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Set up QEMU
uses: actions/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: actions/setup-buildx-action@v2
-
name: Login to Gitea Package Registry
uses: actions/login-action@v2
with:
registry: gitea.ocram85.com
username: ${{ secrets.USERNAME }}
#password: ${{ secrets.PASSWORD }}
password: ${{ secrets.TOKEN }}
-
name: Build and push
uses: actions/build-push-action@v4
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
#tags: gitea.ocram85.com/ocram85/swarmproxy:next2

View File

@ -0,0 +1,29 @@
name: test
run-name: docker pipeline
on: [ 'push' ]
jobs:
docker:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
-
name: Set up Docker Buildx
uses: actions/setup-buildx-action@v2
#-
# name: Login to Gitea Package Registry
# uses: actions/login-action@v2
# with:
# registry: gitea.ocram85.com
# username: ${{ secrets.USERNAME }}
# password: ${{ secrets.TOKEN }}
-
name: Build and push
uses: actions/build-push-action@v4
with:
push: false
#tags: gitea.ocram85.com/ocram85/swarmproxy:next
tags: ocram85/swarmproxy:test