Skip to content

Commit 1971812

Browse files
committed
Better handling of docker tags
This should result in more sane docker tags
1 parent 085a7c7 commit 1971812

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/build-tags.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,21 @@ jobs:
1616
registry: docker.pkg.github.com
1717
username: ${{ github.repository_owner }}
1818
password: ${{ secrets.GITHUB_TOKEN }}
19+
- name: Extract metadata (tags, labels) for Docker
20+
id: meta
21+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
22+
with:
23+
images: docker.pkg.github.com/londonhackspace/kube-auth-handler/server
24+
flavor: |
25+
latest=false
1926
- name: Build and push
2027
uses: docker/build-push-action@v2
2128
with:
2229
context: .
2330
platforms: linux/amd64
2431
push: true
25-
tags: |
26-
docker.pkg.github.com/londonhackspace/kube-auth-handler/server:${GITHUB_REF##*/}
32+
tags: ${{ steps.meta.outputs.tags }}
33+
labels: ${{ steps.meta.outputs.labels }}
2734
build_client:
2835
name: Build Clients
2936
runs-on: ubuntu-latest
@@ -46,4 +53,4 @@ jobs:
4653
env:
4754
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4855
ISSUE: ${{ github.event.issue.html_url }}
49-
run: gh release create ${GITHUB_REF##*/} ldap-kube-auth_*
56+
run: gh release create ${GITHUB_REF##*/} auth-client/ldap-kube-auth_*

0 commit comments

Comments
 (0)