Skip to content

Commit

Permalink
fix: workflow-dispatch image push
Browse files Browse the repository at this point in the history
  • Loading branch information
pratapalakshmi committed Aug 16, 2023
1 parent a8cad9c commit f8450c7
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 18 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/publish-backoffice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,23 @@ jobs:
type=raw,value=commit-${{ github.sha }}-prod
type=raw,value=${{ steps.get_version.outputs.version }}-prod
- name: Extract metadata for other branches Docker
if: ${{ github.event_name == 'workflow_dispatch' }}
id: branchmeta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ github.head_ref || github.ref_name }}
type=raw,value=commit-${{ github.sha }}-${{ github.head_ref || github.ref_name }}
- name: Build and push Docker image for Dev Branch
if: github.ref == 'refs/heads/dev'
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: apps/backoffice-v2
push: true
tags: ${{ steps.devmeta.outputs.tags }}
labels: ${{ steps.devmeta.outputs.labels }}

- name: Build and push Docker image for Test Branch
if: github.ref == 'refs/heads/test'
Expand All @@ -94,7 +103,6 @@ jobs:
context: apps/backoffice-v2
push: true
tags: ${{ steps.testmeta.outputs.tags }}
labels: ${{ steps.testmeta.outputs.labels }}

- name: Build and push Docker image for prod Branch
if: github.ref == 'refs/heads/prod'
Expand All @@ -103,4 +111,11 @@ jobs:
context: apps/backoffice-v2/
push: true
tags: ${{ steps.prodmeta.outputs.tags }}
labels: ${{ steps.prodmeta.outputs.labels }}

- name: Build and push Docker image for other branch
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: apps/backoffice-v2/
push: true
tags: ${{ steps.branchmeta.outputs.tags }}
21 changes: 18 additions & 3 deletions .github/workflows/publish-headless-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,23 @@ jobs:
type=raw,value=commit-${{ github.sha }}-prod
type=raw,value=${{ steps.get_version.outputs.version }}-prod
- name: Extract metadata for other branches Docker
if: ${{ github.event_name == 'workflow_dispatch' }}
id: branchmeta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ github.head_ref || github.ref_name }}
type=raw,value=commit-${{ github.sha }}-${{ github.head_ref || github.ref_name }}
- name: Build and push Docker image for Dev Branch
if: github.ref == 'refs/heads/dev'
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: examples/headless-example
push: true
tags: ${{ steps.devmeta.outputs.tags }}
labels: ${{ steps.devmeta.outputs.labels }}

- name: Build and push Docker image for Test Branch
if: github.ref == 'refs/heads/test'
Expand All @@ -95,7 +104,6 @@ jobs:
context: examples/headless-example
push: true
tags: ${{ steps.testmeta.outputs.tags }}
labels: ${{ steps.testmeta.outputs.labels }}

- name: Build and push Docker image for Prod Branch
if: github.ref == 'refs/heads/prod'
Expand All @@ -104,4 +112,11 @@ jobs:
context: examples/headless-example
push: true
tags: ${{ steps.prodmeta.outputs.tags }}
labels: ${{ steps.prodmeta.outputs.labels }}

- name: Build and push Docker image for other branch
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: examples/headless-example
push: true
tags: ${{ steps.branchmeta.outputs.tags }}
22 changes: 19 additions & 3 deletions .github/workflows/publish-kyb-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,23 @@ jobs:
type=raw,value=commit-${{ github.sha }}-prod
type=raw,value=${{ steps.get_version.outputs.version }}-prod
- name: Extract metadata for other branches Docker
if: ${{ github.event_name == 'workflow_dispatch' }}
id: branchmeta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ github.head_ref || github.ref_name }}
type=raw,value=commit-${{ github.sha }}-${{ github.head_ref || github.ref_name }}
- name: Build and push Docker image for Dev Branch
if: github.ref == 'refs/heads/dev'
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: examples/kyb-app
push: true
tags: ${{ steps.devmeta.outputs.tags }}
labels: ${{ steps.devmeta.outputs.labels }}

- name: Build and push Docker image for Test Branch
if: github.ref == 'refs/heads/test'
Expand All @@ -95,7 +104,6 @@ jobs:
context: examples/kyb-app
push: true
tags: ${{ steps.testmeta.outputs.tags }}
labels: ${{ steps.testmeta.outputs.labels }}

- name: Build and push Docker image for Prod Branch
if: github.ref == 'refs/heads/prod'
Expand All @@ -104,4 +112,12 @@ jobs:
context: examples/kyb-app
push: true
tags: ${{ steps.prodmeta.outputs.tags }}
labels: ${{ steps.prodmeta.outputs.labels }}

- name: Build and push Docker image for other branch
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: examples/kyb-app
push: true
tags: ${{ steps.branchmeta.outputs.tags }}

21 changes: 18 additions & 3 deletions .github/workflows/publish-websocket.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,23 @@ jobs:
type=raw,value=commit-${{ github.sha }}-prod
type=raw,value=${{ steps.get_version.outputs.version }}-prod
- name: Extract metadata for other branches Docker
if: ${{ github.event_name == 'workflow_dispatch' }}
id: branchmeta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ github.head_ref || github.ref_name }}
type=raw,value=commit-${{ github.sha }}-${{ github.head_ref || github.ref_name }}
- name: Build and push Docker image for Dev Branch
if: github.ref == 'refs/heads/dev'
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: services/websocket-service
push: true
tags: ${{ steps.devmeta.outputs.tags }}
labels: ${{ steps.devmeta.outputs.labels }}

- name: Build and push Docker image for Test Branch
if: github.ref == 'refs/heads/test'
Expand All @@ -94,7 +103,6 @@ jobs:
context: services/websocket-service
push: true
tags: ${{ steps.testmeta.outputs.tags }}
labels: ${{ steps.testmeta.outputs.labels }}

- name: Build and push Docker image for Test Branch
if: github.ref == 'refs/heads/prod'
Expand All @@ -103,4 +111,11 @@ jobs:
context: services/websocket-service
push: true
tags: ${{ steps.prodmeta.outputs.tags }}
labels: ${{ steps.prodmeta.outputs.labels }}

- name: Build and push Docker image for other branch
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: services/websocket-service
push: true
tags: ${{ steps.branchmeta.outputs.tags }}
21 changes: 18 additions & 3 deletions .github/workflows/publish-workflows-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,23 @@ jobs:
type=raw,value=commit-${{ github.sha }}-prod
type=raw,value=${{ steps.get_version.outputs.version }}-prod
- name: Extract metadata for other branches Docker
if: ${{ github.event_name == 'workflow_dispatch' }}
id: branchmeta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ github.head_ref || github.ref_name }}
type=raw,value=commit-${{ github.sha }}-${{ github.head_ref || github.ref_name }}
- name: Build and push Docker image for Dev Branch
if: github.ref == 'refs/heads/dev'
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: apps/workflows-dashboard
push: true
tags: ${{ steps.devmeta.outputs.tags }}
labels: ${{ steps.devmeta.outputs.labels }}

- name: Build and push Docker image for Test Branch
if: github.ref == 'refs/heads/test'
Expand All @@ -95,7 +104,6 @@ jobs:
context: apps/workflows-dashboard
push: true
tags: ${{ steps.testmeta.outputs.tags }}
labels: ${{ steps.testmeta.outputs.labels }}

- name: Build and push Docker image for Prod Branch
if: github.ref == 'refs/heads/prod'
Expand All @@ -104,4 +112,11 @@ jobs:
context: apps/workflows-dashboard
push: true
tags: ${{ steps.prodmeta.outputs.tags }}
labels: ${{ steps.prodmeta.outputs.labels }}

- name: Build and push Docker image for other branch
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: apps/workflows-dashboard
push: true
tags: ${{ steps.branchmeta.outputs.tags }}
20 changes: 17 additions & 3 deletions .github/workflows/publish-workflows-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ jobs:
type=raw,value=${{ steps.get_version.outputs.version }}-prod
type=raw,value=latest
- name: Extract metadata for other branches Docker
if: ${{ github.event_name == 'workflow_dispatch' }}
id: branchmeta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ github.head_ref || github.ref_name }}
type=raw,value=commit-${{ github.sha }}-${{ github.head_ref || github.ref_name }}
- name: Build and push Docker image for Dev
if: github.ref == 'refs/heads/dev'
Expand All @@ -88,7 +97,6 @@ jobs:
context: services/workflows-service
push: true
tags: ${{ steps.devmeta.outputs.tags }}
labels: ${{ steps.devmeta.outputs.labels }}

- name: Build and push Docker image for Test
if: github.ref == 'refs/heads/test'
Expand All @@ -97,7 +105,6 @@ jobs:
context: services/workflows-service
push: true
tags: ${{ steps.testmeta.outputs.tags }}
labels: ${{ steps.testmeta.outputs.labels }}

- name: Build and push Docker image for Prod
if: github.ref == 'refs/heads/prod'
Expand All @@ -106,4 +113,11 @@ jobs:
context: services/workflows-service
push: true
tags: ${{ steps.prodmeta.outputs.tags }}
labels: ${{ steps.prodmeta.outputs.labels }}

- name: Build and push Docker image for other branch
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: services/workflows-service
push: true
tags: ${{ steps.branchmeta.outputs.tags }}

0 comments on commit f8450c7

Please sign in to comment.