Skip to content

Commit

Permalink
fix: cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
Friedjof committed Oct 9, 2024
1 parent 0cdb3f2 commit c2d9f8d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build, Publish Docker Image, and Create Release
on:
push:
tags:
- 'v*' # Trigger bei jedem neuen Tag, der mit "v" beginnt, z.B. "v0.0.2"
- 'v*'

jobs:
build:
Expand All @@ -13,6 +13,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Convert owner and repository name to lowercase
id: lowercase
run: |
echo "OWNER=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "REPO_NAME=$(echo 'laundrytracker' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
Expand All @@ -29,8 +35,8 @@ jobs:
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]'):${{ github.ref_name }}
ghcr.io/${{ github.repository_owner }}/$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]'):latest
ghcr.io/${{ env.OWNER }}/{{ env.REPO_NAME }}:${{ github.ref_name }}
ghcr.io/${{ env.OWNER }}/{{ env.REPO_NAME }}:latest
- name: Create GitHub Release
id: create_release
Expand All @@ -40,6 +46,6 @@ jobs:
release_name: Release ${{ github.ref_name }}
body: |
This release is automatically generated from the new tag.
Docker image is available under ghcr.io/${{ github.repository_owner }}/$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]'):${{ github.ref_name }}
Docker image is available under ghcr.io/${{ env.OWNER }}/{{ env.REPO_NAME }}:${{ github.ref_name }}
draft: false
prerelease: false

0 comments on commit c2d9f8d

Please sign in to comment.