From 18d0905531029d1b5b4e8c14c12bef44dfa1b19c Mon Sep 17 00:00:00 2001 From: dresi Date: Thu, 11 Jun 2026 09:22:52 +0200 Subject: [PATCH] feat: add sha/version tagging and feature branch support --- .gitea/workflows/rsyncd.yaml | 23 ++++++++++++++++++++++- .gitea/workflows/telegraf-snmp.yaml | 23 ++++++++++++++++++++++- README.md | 11 +++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 README.md diff --git a/.gitea/workflows/rsyncd.yaml b/.gitea/workflows/rsyncd.yaml index c2baa1f..28c76b9 100644 --- a/.gitea/workflows/rsyncd.yaml +++ b/.gitea/workflows/rsyncd.yaml @@ -2,9 +2,14 @@ name: Build and push rsyncd image run-name: ${{ gitea.actor }} is building and pushing rsyncd image on: push: + branches: + - main + - 'feat/**' paths: - 'rsyncd/**' - '.gitea/workflows/rsyncd.yaml' + tags: + - 'v*' env: RESULT_IMAGE_NAME: tools/rsyncd @@ -28,6 +33,22 @@ jobs: echo "${{ vars.PRIVATE_REGISTRY_CA_CERT }}" | sudo tee /usr/local/share/ca-certificates/private-ca.crt > /dev/null sudo update-ca-certificates + - name: Compute image tags + id: tags + run: | + BASE="${{ vars.PRIVATE_REGISTRY_DOMAIN }}/${{ env.RESULT_IMAGE_NAME }}" + { + echo "value<> "$GITHUB_OUTPUT" + - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -44,4 +65,4 @@ jobs: context: rsyncd platforms: linux/amd64,linux/arm64 push: true - tags: ${{ vars.PRIVATE_REGISTRY_DOMAIN }}/${{ env.RESULT_IMAGE_NAME }}:latest + tags: ${{ steps.tags.outputs.value }} diff --git a/.gitea/workflows/telegraf-snmp.yaml b/.gitea/workflows/telegraf-snmp.yaml index 4555683..4535837 100644 --- a/.gitea/workflows/telegraf-snmp.yaml +++ b/.gitea/workflows/telegraf-snmp.yaml @@ -2,9 +2,14 @@ name: Build and push telegraf-snmp image run-name: ${{ gitea.actor }} is building and pushing telegraf-snmp image on: push: + branches: + - main + - 'feat/**' paths: - 'telegraf-snmp/**' - '.gitea/workflows/telegraf-snmp.yaml' + tags: + - 'v*' env: RESULT_IMAGE_NAME: tools/telegraf-snmp @@ -28,6 +33,22 @@ jobs: echo "${{ vars.PRIVATE_REGISTRY_CA_CERT }}" | sudo tee /usr/local/share/ca-certificates/private-ca.crt > /dev/null sudo update-ca-certificates + - name: Compute image tags + id: tags + run: | + BASE="${{ vars.PRIVATE_REGISTRY_DOMAIN }}/${{ env.RESULT_IMAGE_NAME }}" + { + echo "value<> "$GITHUB_OUTPUT" + - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -44,4 +65,4 @@ jobs: context: telegraf-snmp platforms: linux/amd64,linux/arm64 push: true - tags: ${{ vars.PRIVATE_REGISTRY_DOMAIN }}/${{ env.RESULT_IMAGE_NAME }}:latest + tags: ${{ steps.tags.outputs.value }} diff --git a/README.md b/README.md new file mode 100644 index 0000000..0fc5cec --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# container-images + +## CI Workflows + +| Trigger | Tags gebaut | +|---|---| +| Push auf `feat/**` | `:` | +| Push/Merge auf `main` | `:` + `:latest` | +| `git tag v1.0.0 && git push origin v1.0.0` | `:` + `:v1.0.0` | + +`:latest` wird nur durch Pushes auf `main` überschrieben. Feature-Branches bauen immer, lassen `:latest` aber unberührt.