Skip to content

Commit

Permalink
Fix ennv
Browse files Browse the repository at this point in the history
  • Loading branch information
jayjb committed Dec 12, 2023
1 parent 3c032f3 commit c6c4aa1
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,21 @@ jobs:
COPYFILE_DISABLE: 1

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: set Canarytokens Docker repo branch
run: |
if [ -z "${{ github.event.inputs.canarytokens-docker-branch }}" ]; then
BRANCH="master"
else
BRANCH="${{ github.event.inputs.canarytokens-docker-branch }}"
fi
echo "CANARYTOKENS_DOCKER_BRANCH=$BRANCH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
with:
repository: thinkst/canarytokens-docker
path: canarytokens-docker
ref: ${{ github.event.inputs.canarytokens-docker-branch }}
ref: "$CANARYTOKENS_DOCKER_BRANCH"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand Down Expand Up @@ -81,7 +91,7 @@ jobs:
cd /home/ubuntu/canarytokens-scripts/
./canarytokensdb_s3backup.sh
cd /home/ubuntu/canarytokens-docker
git stash && git checkout ${{ github.event.inputs.canarytokens-docker-branch }} && git pull
git stash && git checkout $CANARYTOKENS_DOCKER_BRANCH && git pull
sed "s/thinkst\/canarytokens$/thinkst\/canarytokens:${GITHUB_REF##*/}/g" common-services.yml > common-services-${GITHUB_REF##*/}.yml
sed "s/file: common-services.yml/file: common-services-${GITHUB_REF##*/}.yml/g" docker-compose-letsencrypt.yml > docker-compose-letsencrypt-${GITHUB_REF##*/}.yml
sed -i'' "s/CANARY_DEV_BUILD_ID=.*/CANARY_DEV_BUILD_ID=${GITHUB_SHA:0:8}/" frontend.env
Expand All @@ -101,7 +111,7 @@ jobs:
cd /home/ubuntu/canarytokens-scripts/
./canarytokensdb_s3backup.sh
cd /home/ubuntu/canarytokens-docker
git stash && git checkout ${{ github.event.inputs.canarytokens-docker-branch }} && git pull
git stash && git checkout $CANARYTOKENS_DOCKER_BRANCH && git pull
sed "s/thinkst\/canarytokens$/thinkst\/canarytokens:${GITHUB_REF##*/}/g" common-services.yml > common-services-${GITHUB_REF##*/}.yml
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
sed -i'' "s/CANARY_DEV_BUILD_ID=.*/CANARY_DEV_BUILD_ID=${GITHUB_SHA:0:8}/" frontend.env
Expand Down

0 comments on commit c6c4aa1

Please sign in to comment.