-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (41 loc) · 1.74 KB
/
publish-to-docker-hub-on-manual.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Publish to docker hub (manual)
on:
workflow_dispatch:
jobs:
push_to_registry:
name: Build and push to docker hub
runs-on: ubuntu-latest
steps:
- name: Setup BUILD_TAG environment variable
run: echo "BUILD_TAG=\"${GITHUB_REPOSITORY#*/} | Branch ${GITHUB_REF#refs/heads/} | SHA ${GITHUB_SHA:0:7} | BuildTime $(date '+%Y-%m-%dT%H:%M:%S')\"" >> $GITHUB_ENV
- name: Print the BUILD_TAG
run: echo ${{ env.BUILD_TAG }}
- name: Check out the repo
uses: actions/checkout@v2
- name: Push api application image to docker hub
uses: docker/build-push-action@v1
with:
path: modules/api
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
repository: nhsgpconnect/gpconnect-appointment-checker-api-application
build_args: ${{ format('BUILD_TAG={0}', env.BUILD_TAG) }}
tag_with_ref: true
- name: Push end user application image to docker hub
uses: docker/build-push-action@v1
with:
path: modules/end-user
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
repository: nhsgpconnect/gpconnect-appointment-checker-end-user-application
build_args: ${{ format('BUILD_TAG={0}', env.BUILD_TAG) }}
tag_with_ref: true
- name: Push database image to docker hub
uses: docker/build-push-action@v1
with:
path: database
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
repository: nhsgpconnect/gpconnect-appointment-checker-dbpatcher
build_args: ${{ format('BUILD_TAG={0}', env.BUILD_TAG) }}
tag_with_ref: true