setup basic action based ci (#3)
Some checks failed
docker / build-container (push) Failing after 1s

#### 📖 Summary

testing semver

#### 📑 Test Plan

> 💡 Select your test plan for the code changes.

- [x] CI pipeline tests
- [ ] Custom test
- [ ] No test plan

##### Details / Justification

<!-- Add your test details or justification for missing tests here. -->

#### 📚 Additional Notes

<!-- A place for additional detail notes. -->

Co-authored-by: OCram85 <marco.blessing@googlemail.com>
Reviewed-on: #3
This commit is contained in:
OCram85 2023-07-10 11:51:45 +02:00
parent be6185e4fb
commit 5785f1af82
5 changed files with 66 additions and 13 deletions

View File

@ -0,0 +1,51 @@
name: docker
run-name: Container Image Deployment
on:
push:
branches:
- 'master'
tags:
- 'v*'
jobs:
build-container:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
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:
context: .
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

@ -4,33 +4,35 @@ run-name: ${{ gitea.actor }} testing docker builder
on:
push:
branches: none #[ main ]
#paths: .github/workflows/1-actions-ci-cd-aks.yml
#branches: none #[ main ]
pull_request:
branches: none # [ main ]
#branches: none # [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-container:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
#-
# name: Set up QEMU
# uses: actions/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: actions/setup-buildx-action@v2
-
name: Login to Gitea Package Registry
uses: docker/login-action@v2
uses: actions/login-action@v2
with:
registry: gitea.ocram85.com
username: ${{ secrets.GITEA_USERNAME }}
password: ${{ secrets.GITEA_TOKEN }}
username: ${{ secrets.USERNAME }}
#password: ${{ secrets.PASSWORD }}
password: ${{ secrets.TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
uses: actions/build-push-action@v4
with:
push: false #true
tags: gitea.ocram85.com/ocram85/swarmproxy:next
push: false
tags: gitea.ocram85.com/ocram85/swarmproxy:next2