11
11
canarytokens-docker-branch :
12
12
description : " Branch of the canarytokens-docker repo to pull for build. Defaults to master"
13
13
required : false
14
+ default : " master"
14
15
15
16
jobs :
16
17
build :
@@ -19,21 +20,11 @@ jobs:
19
20
COPYFILE_DISABLE : 1
20
21
21
22
steps :
22
- # Checkout canarytokens-docker repo. This lands in ./canarytokens-docker
23
- - name : Set canarytokens-docker-branch
24
- run : |
25
- if [ -z "${{ github.event.inputs.canarytokens-docker-branch}}" ]; then
26
- BRANCH="master"
27
- else echo
28
- BRANCH="${{ github.event.inputs.canarytokens-docker-branch }}"
29
- fi
30
- echo "CANARYTOKENS_DOCKER_BRANCH=$BRANCH" >> $GITHUB_ENV
31
-
32
23
- uses : actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
33
24
with :
34
25
repository : thinkst/canarytokens-docker
35
26
path : canarytokens-docker
36
- ref : ${{ env.CANARYTOKENS_DOCKER_BRANCH }}
27
+ ref : ${{ github.event.inputs.canarytokens-docker-branch }}
37
28
38
29
- name : Set up Docker Buildx
39
30
uses : docker/setup-buildx-action@v1
90
81
cd /home/ubuntu/canarytokens-scripts/
91
82
./canarytokensdb_s3backup.sh
92
83
cd /home/ubuntu/canarytokens-docker
93
- git stash && git checkout ${{ env.CANARYTOKENS_DOCKER_BRANCH }} && git pull
84
+ git stash && git checkout ${{ github.event.inputs.canarytokens-docker-branch }} && git pull
94
85
sed "s/thinkst\/canarytokens$/thinkst\/canarytokens:${GITHUB_REF##*/}/g" common-services.yml > common-services-${GITHUB_REF##*/}.yml
95
86
sed "s/file: common-services.yml/file: common-services-${GITHUB_REF##*/}.yml/g" docker-compose-letsencrypt.yml > docker-compose-letsencrypt-${GITHUB_REF##*/}.yml
96
87
sed -i'' "s/CANARY_DEV_BUILD_ID=.*/CANARY_DEV_BUILD_ID=${GITHUB_SHA:0:8}/" frontend.env
@@ -110,7 +101,7 @@ jobs:
110
101
cd /home/ubuntu/canarytokens-scripts/
111
102
./canarytokensdb_s3backup.sh
112
103
cd /home/ubuntu/canarytokens-docker
113
- git stash && git checkout master && git pull
104
+ git stash && git checkout ${{ github.event.inputs.canarytokens-docker-branch }} && git pull
114
105
sed "s/thinkst\/canarytokens$/thinkst\/canarytokens:${GITHUB_REF##*/}/g" common-services.yml > common-services-${GITHUB_REF##*/}.yml
115
106
sed "s/file: common-services.yml/file: common-services-${GITHUB_REF##*/}.yml/g" docker-compose-aws-logging-letsencrypt.yml > docker-compose-aws-logging-letsencrypt-${GITHUB_REF##*/}.yml
116
107
sed -i'' "s/CANARY_DEV_BUILD_ID=.*/CANARY_DEV_BUILD_ID=${GITHUB_SHA:0:8}/" frontend.env
0 commit comments