Skip to content

Commit

Permalink
feat: add docker tags (#50)
Browse files Browse the repository at this point in the history
* feat: add docker tags

* fix: move tags to on push
  • Loading branch information
gregfrasco authored Mar 7, 2023
1 parent 7004753 commit 673ea2b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/admin-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- 'packages/client-admin/**'
branches:
- main
tags:
- "v*.*.*"
pull_request:
paths:
- 'packages/client-admin/**'
Expand Down Expand Up @@ -33,6 +35,16 @@ jobs:
run: npm run prettier
- name: Build
run: npm run build
- name: Docker Tags
id: meta
uses: docker/metadata-action@v4
with:
images: hicsail/auth-admin-client
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Login to Docker Hub
uses: docker/login-action@v2
if: github.ref == 'refs/heads/main'
Expand All @@ -44,7 +56,8 @@ jobs:
with:
context: ./packages/client-admin
push: ${{ github.event_name != 'pull_request' }}
tags: hicsail/auth-admin-client:unstable
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Push to Staging
uses: fjogeleit/http-request-action@v1
if: github.ref == 'refs/heads/main'
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- 'packages/server/**'
branches:
- main
tags:
- "v*.*.*"
pull_request:
paths:
- 'packages/server/**'
Expand Down Expand Up @@ -40,6 +42,16 @@ jobs:
with:
files: ./packages/server/coverage/lcov.info
fail_ci_if_error: false
- name: Docker Tags
id: meta
uses: docker/metadata-action@v4
with:
images: hicsail/auth-server
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Login to Docker Hub
uses: docker/login-action@v2
if: github.ref == 'refs/heads/main'
Expand All @@ -51,7 +63,8 @@ jobs:
with:
context: ./packages/server
push: ${{ github.event_name != 'pull_request' }}
tags: hicsail/auth:unstable
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Push to Staging
uses: fjogeleit/http-request-action@v1
if: github.ref == 'refs/heads/main'
Expand Down

0 comments on commit 673ea2b

Please sign in to comment.