diff --git a/.github/workflows/custom-docker-build-push.yml b/.github/workflows/custom-docker-build-push.yml index f040a3ea80..30156e0193 100644 --- a/.github/workflows/custom-docker-build-push.yml +++ b/.github/workflows/custom-docker-build-push.yml @@ -46,6 +46,7 @@ jobs: runs-on: ubuntu-latest steps: + # Env variables - name: Assign username from secret if: ${{ inputs.Override_Registry_Username == ''}} run: | @@ -74,23 +75,9 @@ jobs: run: | echo "repo_name=${GITHUB_REPOSITORY#*/}" >> "$GITHUB_ENV" - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - install: true - - - name: Login to container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.Registry_Base_URL }} - username: ${{ env.Registry_Username }} - password: ${{ env.Registry_Password }} - + # Code - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: path: "./repo" @@ -103,11 +90,19 @@ jobs: mv ./_repo ./repo ls ./repo - - name: Docker Buildx setup + # Docker + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: install: true + - name: Login to container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.Registry_Base_URL }} + username: ${{ env.Registry_Username }} + password: ${{ env.Registry_Password }} + - name: Docker Build and Push (with cache) if: ${{ fromJSON(env.Use_Build_Cache) == true }} uses: docker/build-push-action@v6