Skip to content

Commit 3ed31f9

Browse files
committed
removing build_info step and adding if main ignore
1 parent 21c5356 commit 3ed31f9

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
ghcr.io/tibiadata/tibiadata-api-go
3131
tags: |
3232
type=edge
33-
type=ref,event=branch
33+
type=ref,event=branch,enable=${{ (github.ref != 'refs/heads/main') }}
3434
type=semver,pattern=v{{version}}
3535
type=semver,pattern=v{{major}}.{{minor}}
3636
@@ -63,15 +63,6 @@ jobs:
6363
username: ${{ github.actor }}
6464
password: ${{ secrets.GITHUB_TOKEN }}
6565

66-
- name: Configure build information
67-
id: build_information
68-
run: |
69-
if [[ ${{ github.ref_type }} == "tag" ]]; then
70-
echo "::set-output name=release_name::$( echo ${{ github.ref_name }} )"
71-
else
72-
echo "::set-output name=release_name::$( echo unknown )"
73-
fi
74-
7566
- name: Build and push
7667
uses: docker/build-push-action@v2.7.0
7768
with:
@@ -85,5 +76,5 @@ jobs:
8576
cache-to: type=local,dest=/tmp/.buildx-cache
8677
build-args: |
8778
TibiadataBuildBuilder=github
88-
TibiadataBuildRelease=${{ steps.build_information.outputs.release_name }}
89-
TibiadataBuildCommit=${{ github.sha }}
79+
TibiadataBuildRelease=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
80+
TibiadataBuildCommit=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}

0 commit comments

Comments
 (0)