Skip to content

Commit eac91fd

Browse files
authored
Build and push docker images after release (#1289)
Ensures Docker images are built and pushed during release.
1 parent 1351b5f commit eac91fd

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.github/workflows/docker.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ on:
55
push:
66
branches:
77
- master
8-
tags:
9-
- "*"
108
pull_request:
119
branches:
1210
- master
@@ -56,6 +54,7 @@ jobs:
5654
env:
5755
TAG: ${{ env.TAG }}
5856

57+
# push latest image
5958
- name: Run Docker push
6059
if: ${{ env.DOCKER_REGISTRY_USER != '' && env.DOCKER_REGISTRY_PASSWORD != '' && github.event_name != 'pull_request' }}
6160
run: make docker-push

.github/workflows/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,17 @@ jobs:
111111
--token $ANSIBLE_GALAXY_TOKEN
112112
env:
113113
ANSIBLE_GALAXY_TOKEN: ${{ secrets.ANSIBLE_GALAXY_TOKEN }}
114+
115+
- name: Build release image
116+
run: make docker-build
117+
env:
118+
TAG: ${{ env.TAG }}
119+
120+
- name: Push release image
121+
if: ${{ env.DOCKER_REGISTRY_USER != '' && env.DOCKER_REGISTRY_PASSWORD != '' }}
122+
run: make docker-push
123+
env:
124+
TAG: ${{ env.TAG }}
125+
DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_USERNAME }}
126+
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
127+

0 commit comments

Comments
 (0)