Skip to content

Commit

Permalink
Printing metadata tags and labels
Browse files Browse the repository at this point in the history
  • Loading branch information
MukuFlash03 committed Oct 4, 2024
1 parent 2c3a47d commit 6f3a731
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/reusable_image_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,16 @@ jobs:
# name/app
tags: |
# type=ref,event=branch
# type=ref,event=tag
# type=semver,pattern=v{{version}}
# type=semver,pattern=v{{version}},value=${{ steps.fetch-latest-release-tags.outputs.tag_name }}
# type=semver,pattern=v{{version}},value=v4.2.6
# type=raw,value=latest,enable=${{ github.ref == format('refs/tags/{0}', steps.fetch-latest-release-tags.outputs.tag_name ) }}
type=ref,event=tag
type=semver,pattern=v{{version}}
type=semver,pattern=v{{version}},value=${{ steps.fetch-latest-release-tags.outputs.tag_name }}
- name: Print docker metadata tags and label
run: |
echo Tags
echo ${{ steps.meta.outputs.tags }}
echo Labels
echo ${{ steps.meta.outputs.labels }}
- name: Login to DockerHub
# if: github.event_name != 'pull_request'
Expand All @@ -111,12 +116,12 @@ jobs:
username: ${{ env.DOCKER_USER }}
password: ${{ env.DOCKER_PASSWORD }}

# - name: Get current date # get the date of the build
# id: date
# run: echo "date=$(date +'%Y-%m-%d--%M-%S')" >> "$GITHUB_OUTPUT"
- name: Get current date # get the date of the build
id: date
run: echo "date=$(date +'%Y-%m-%d--%M-%S')" >> "$GITHUB_OUTPUT"

# - name: Run a one-line script
# run: echo running image build for repo ${{ inputs.repo }} branch ${{ inputs.branch }} on ${{ steps.date.outputs.date }}
- name: Run a one-line script
run: echo running image build for repo ${{ inputs.repo }} branch ${{ inputs.branch }} on ${{ steps.date.outputs.date }}

# - name: build docker image
# run: |
Expand Down

0 comments on commit 6f3a731

Please sign in to comment.