diff --git a/.github/workflows/trigger-build-on-changes.yml b/.github/workflows/trigger-build-on-changes.yml index 0d0fd40..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: @@ -28,11 +26,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: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Cache Docker layers uses: actions/cache@v2 @@ -43,19 +43,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