From 73d90388a72c7a42260aef7c2cf6b95c0c057ece Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Wed, 21 Feb 2024 10:46:23 -0500 Subject: [PATCH 1/2] update build cache --- .../workflows/trigger-build-on-changes.yml | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/trigger-build-on-changes.yml b/.github/workflows/trigger-build-on-changes.yml index 0d0fd40..7c61c57 100644 --- a/.github/workflows/trigger-build-on-changes.yml +++ b/.github/workflows/trigger-build-on-changes.yml @@ -28,11 +28,13 @@ jobs: echo ::set-output name=tag::${TAG} - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@master + uses: docker/setup-buildx-action@v3 - - name: Docker Login - run: | - echo "$DOCKER_PASSWORD" | docker login --username $DOCKER_USER --password-stdin + - name: Docker Hub Login + uses: docker/login-action@v3 + with: + username: $DOCKER_USER + password: $DOCKER_PASSWORD - name: Cache Docker layers uses: actions/cache@v2 @@ -43,19 +45,10 @@ jobs: ${{ runner.os }}-single-buildx - name: Build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: . - builder: ${{ steps.buildx.outputs.name }} push: true tags: ${{ steps.prep.outputs.tagged_image }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new - - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache \ No newline at end of file + cache-from: type=gha + cache-to: type=gha,mode=max \ No newline at end of file From 49e60991f68ccb49c25d1c8a9554c61e17934919 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Wed, 21 Feb 2024 10:49:36 -0500 Subject: [PATCH 2/2] dockerhub env --- .github/workflows/trigger-build-on-changes.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/trigger-build-on-changes.yml b/.github/workflows/trigger-build-on-changes.yml index 7c61c57..b5382e9 100644 --- a/.github/workflows/trigger-build-on-changes.yml +++ b/.github/workflows/trigger-build-on-changes.yml @@ -3,8 +3,6 @@ name: Build and Publish to Registry on Github push env: GITHUB_SHA: ${{ github.sha }} REGISTRY_HOSTNAME: docker.io - DOCKER_USER: ${{ secrets.DOCKER_USER }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} REPOSITORY: ${{ secrets.DOCKER_REPOSITORY }} on: @@ -33,8 +31,8 @@ jobs: - name: Docker Hub Login uses: docker/login-action@v3 with: - username: $DOCKER_USER - password: $DOCKER_PASSWORD + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Cache Docker layers uses: actions/cache@v2