Skip to content

Commit b9ceaa3

Browse files
authored
ci: Automatically identify version for all containers
1 parent be6d238 commit b9ceaa3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/push-images.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ jobs:
4747
IMAGE_NAME: ghcr.io/tomkerkhove/microservices-with-api-management-services-order
4848
steps:
4949
- uses: actions/checkout@v2
50+
- name: Determine image tag from Release (${{ github.ref }})
51+
if: ${{ github.event_name == 'release' }}
52+
run: echo "IMAGE_TAG=${{ github.ref }}" >> $GITHUB_ENV
53+
- name: Determine image tag from manual trigger (${{ inputs.imageTag }})
54+
if: ${{ github.event_name == 'workflow_dispatch' }}
55+
run: echo "IMAGE_TAG=${{ inputs.imageTag }}" >> $GITHUB_ENV
5056
- name: Docker Login
5157
uses: docker/[email protected]
5258
with:
@@ -64,6 +70,12 @@ jobs:
6470
IMAGE_NAME: ghcr.io/tomkerkhove/microservices-with-api-management-services-shipment
6571
steps:
6672
- uses: actions/checkout@v2
73+
- name: Determine image tag from Release (${{ github.ref }})
74+
if: ${{ github.event_name == 'release' }}
75+
run: echo "IMAGE_TAG=${{ github.ref }}" >> $GITHUB_ENV
76+
- name: Determine image tag from manual trigger (${{ inputs.imageTag }})
77+
if: ${{ github.event_name == 'workflow_dispatch' }}
78+
run: echo "IMAGE_TAG=${{ inputs.imageTag }}" >> $GITHUB_ENV
6779
- name: Docker Login
6880
uses: docker/[email protected]
6981
with:
@@ -81,6 +93,12 @@ jobs:
8193
IMAGE_NAME: ghcr.io/tomkerkhove/microservices-with-api-management-services-product
8294
steps:
8395
- uses: actions/checkout@v2
96+
- name: Determine image tag from Release (${{ github.ref }})
97+
if: ${{ github.event_name == 'release' }}
98+
run: echo "IMAGE_TAG=${{ github.ref }}" >> $GITHUB_ENV
99+
- name: Determine image tag from manual trigger (${{ inputs.imageTag }})
100+
if: ${{ github.event_name == 'workflow_dispatch' }}
101+
run: echo "IMAGE_TAG=${{ inputs.imageTag }}" >> $GITHUB_ENV
84102
- name: Docker Login
85103
uses: docker/[email protected]
86104
with:

0 commit comments

Comments
 (0)