From 55403ccda467ec08bed98db511cc93dc8b562dfa Mon Sep 17 00:00:00 2001 From: Michele Degges Date: Tue, 22 Feb 2022 08:17:19 -0800 Subject: [PATCH] Fixes --- ...ite-docker-image.yml => website-docker-publish.yml} | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) rename .github/workflows/{website-docker-image.yml => website-docker-publish.yml} (75%) diff --git a/.github/workflows/website-docker-image.yml b/.github/workflows/website-docker-publish.yml similarity index 75% rename from .github/workflows/website-docker-image.yml rename to .github/workflows/website-docker-publish.yml index f4bc9a680..ad640444f 100644 --- a/.github/workflows/website-docker-image.yml +++ b/.github/workflows/website-docker-publish.yml @@ -1,4 +1,4 @@ -name: "Website Docker Image" +name: "Website Docker Publish" on: push: @@ -11,8 +11,15 @@ jobs: website-docker-image: runs-on: ubuntu-latest name: Build Docker Image if Necessary + env: + DOCKER_USER: ${{ secrets.WEBSITE_DOCKER_USER }} + DOCKER_TOKEN: ${{ secrets.WEBSITE_DOCKER_TOKEN }} steps: - uses: actions/checkout@v2 + - uses: docker/login-action@v1 + with: + username: ${{ env.DOCKER_USER }} + password: ${{ env.DOCKER_TOKEN }} - run: | IMAGE_TAG=$(cat website/Dockerfile website/package-lock.json | sha256sum | awk '{print $1;}') echo "Using $IMAGE_TAG" @@ -20,7 +27,6 @@ jobs: echo "Dependencies have not changed, not building a new website docker image." else cd website/ - docker login -u $WEBSITE_DOCKER_USER -p $WEBSITE_DOCKER_PASS docker build -t hashicorp/packer-website:$IMAGE_TAG . docker tag hashicorp/packer-website:$IMAGE_TAG hashicorp/packer-website:latest docker push hashicorp/packer-website