Skip to content

Commit

Permalink
Update cicd.yml
Browse files Browse the repository at this point in the history
Revert to old cicd
  • Loading branch information
FloSch62 authored Jan 12, 2025
1 parent 0d4db23 commit 1a40bb8
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: CICD

on:
push:
branches: ["**"]
tags: ["*.*.*"]
release:
types: [published, prereleased]
types: [created]

env:
REGISTRY: ghcr.io
Expand All @@ -25,6 +28,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

# replaces slashes with dashes in platform name
- name: Convert platform pairs
run: |
platform=${{ matrix.platform }}
Expand All @@ -34,6 +38,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -53,7 +58,7 @@ jobs:
context: .
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY }}/${{ github.repository }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=${{ env.REGISTRY }}/${{ github.repository }},push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }}

- name: Export digest
run: |
Expand All @@ -71,6 +76,7 @@ jobs:

merge:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
needs:
- build
steps:
Expand All @@ -90,10 +96,14 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
type=semver,pattern={{version}}
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -108,4 +118,4 @@ jobs:
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ github.repository }}:${{ steps.meta.outputs.version }}
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ github.repository }}:${{ steps.meta.outputs.version }}

0 comments on commit 1a40bb8

Please sign in to comment.