Skip to content

Commit

Permalink
Update dotnet.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeViper authored Nov 10, 2024
1 parent 8363262 commit 68a9cb5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ toLower(github.repository) }}

jobs:
build:
Expand All @@ -18,6 +17,13 @@ jobs:
id: short-sha
run: echo "short_sha=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT

- name: Set Lowercase Variables
id: vars
shell: bash
run: |
echo "IMAGE_NAME=$(echo ${GITHUB_REPOSITORY} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "BRANCH_NAME=$(echo ${GITHUB_REF_NAME} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Modify asset versions
uses: mingjun97/file-regex-replace@v1
with:
Expand Down Expand Up @@ -100,8 +106,8 @@ jobs:
context: .
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ toLower(github.ref_name) }}-${{ steps.short-sha.outputs.short_sha }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ toLower(github.ref_name) }}-latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.BRANCH_NAME }}-${{ steps.short-sha.outputs.short_sha }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.BRANCH_NAME }}-latest
labels: |
org.opencontainers.image.source=${{ github.repository }}
org.opencontainers.image.revision=${{ github.sha }}

0 comments on commit 68a9cb5

Please sign in to comment.