Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
Updated publish of docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
matbmoser committed Feb 3, 2023
1 parent b17ae9e commit db918f2
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Publish docker images"
name: "Publish Consumer Backend Docker Images"

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
Expand All @@ -15,9 +15,7 @@ on:

env:
REGISTRY: ghcr.io
CONSUMER_UI_IMAGE_NAME: "consumer-ui"
CONSUMER_BACKEND_IMAGE_NAME: "product-pass-consumer-backend"
IMAGE_TAG: ${{ github.sha }}
IMAGE_NAME: "product-pass-consumer-backend"
JAVA_VERSION: 17

jobs:
Expand All @@ -35,6 +33,8 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
Expand All @@ -52,15 +52,6 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Build and push Docker image with Buildx
# https://github.com/docker/build-push-action
- name: Build and push frontend
id: build-and-push-frontend
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.CONSUMER_UI_IMAGE_NAME }}:${{ env.IMAGE_TAG }}

- uses: actions/setup-java@v3
with:
java-version: '${{ env.JAVA_VERSION }}'
Expand All @@ -77,5 +68,5 @@ jobs:
with:
context: consumer-backend/productpass
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.CONSUMER_BACKEND_IMAGE_NAME }}:${{ steps.meta.outputs.tags }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
62 changes: 62 additions & 0 deletions .github/workflows/publish-consumer-ui-docker-images copy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: "Publish Consumer UI Docker Images"

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:

branches: [ "main", "develop", "hotfix/quality-gate-4"]

# Publish semver tags as releases.
# tags: [ 'v*.*.*' ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: "consumer-ui"
JAVA_VERSION: 17

jobs:
build:

runs-on: ubuntu-latest
permissions:
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
# Login against a Docker registry
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Build and push Docker image with Buildx
# https://github.com/docker/build-push-action
- name: Build and push frontend
id: build-and-push-frontend
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion charts/consumer-backend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.2
version: 0.1.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion charts/consumer-ui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.2
version: 0.1.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down

0 comments on commit db918f2

Please sign in to comment.