Skip to content

Commit

Permalink
Added step to get the repository name in the publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
gpan12 committed Dec 12, 2024
1 parent 5c3496e commit b0f0621
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ jobs:
runs-on: ubuntu-latest
if: ${{ (github.ref == 'refs/heads/main') && (github.event.pusher.name != 'fluxcdbot') }}
steps:
- name: Get repo name
id: repo
run: |
echo "${ github.repository }}" | cut -d "/" -f 2 > repo.txt
echo "name=$(cat repo.txt)" >> $GITHUB_OUTPUT
rm repo.txt
- name: Checkout
uses: actions/checkout@v4
- name: Get current date
Expand All @@ -24,7 +30,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
mever/${{ inputs.repo }}
mever/${{ steps.repo.outputs.name }}
tags: |
type=ref,event=branch
type=ref,event=tag
Expand Down

0 comments on commit b0f0621

Please sign in to comment.