Skip to content

Commit b6919a0

Browse files
authored
ci: Properly version images (monolith only)
1 parent eaccae9 commit b6919a0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/push-images.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
name: Push Docker Images to GitHub Container Registry
22
on:
33
workflow_dispatch:
4+
inputs:
5+
imageTag:
6+
description: 'Tag to push images with'
7+
required: true
8+
type: string
9+
tags:
10+
description: 'Test scenario tags'
11+
required: false
12+
type: boolean
13+
release:
14+
types: [published]
415
push:
516
paths:
617
- '.github/workflows/ci-images.yml'
@@ -17,6 +28,12 @@ jobs:
1728
IMAGE_NAME: ghcr.io/tomkerkhove/microservices-with-api-management-monolith
1829
steps:
1930
- uses: actions/checkout@v2
31+
- name: Determine image tag from Release (${GITHUB_REF#refs/*/})
32+
if: ${{ github.event_name == 'release' }}
33+
run: echo "IMAGE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV"
34+
- name: Determine image tag from manual trigger (${{ inputs.imageTag }})
35+
if: ${{ github.event_name == 'release' }}
36+
run: echo "IMAGE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV"
2037
- name: Docker Login
2138
uses: docker/[email protected]
2239
with:

0 commit comments

Comments
 (0)