diff --git a/.github/workflows/docker_build.yaml b/.github/workflows/docker_build.yaml index 517715d9b..4253ec84f 100644 --- a/.github/workflows/docker_build.yaml +++ b/.github/workflows/docker_build.yaml @@ -24,7 +24,6 @@ permissions: jobs: tag_release: runs-on: ubuntu-latest - # Removed env: IMAGE_TAG here, it's not used correctly across jobs outputs: # Define output to pass the tag to the next job new_tag: ${{ steps.tag_version.outputs.next_version }} @@ -125,7 +124,7 @@ jobs: git ls-remote --tags origin | grep "refs/tags/${{ steps.tag_version.outputs.next_version }}" || (echo "Tag push verification failed!" && exit 1) echo "Tag successfully pushed." - build_and_push_docker_image: # Renamed job slightly for clarity + build_and_push_docker_image: runs-on: ubuntu-latest needs: tag_release # Depends on the tag being created successfully permissions: @@ -135,8 +134,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - # No need to checkout specific ref here, use default branch code - # The tag is just metadata for the Docker image version - name: Login to GitHub Container Registry uses: docker/login-action@v3 @@ -154,7 +151,7 @@ jobs: with: images: ghcr.io/${{ github.repository_owner }}/surfsense_backend tags: | - # Use the tag generated in the previous job (FIX) + # Use the tag generated in the previous job type=raw,value=${{ needs.tag_release.outputs.new_tag }} # Optionally add 'latest' tag if building from the default branch type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.event.inputs.branch == github.event.repository.default_branch }} @@ -164,7 +161,6 @@ jobs: with: context: ./surfsense_backend push: true - # Use the tags generated by the metadata action (FIX) tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} # Optional: Add build cache for faster builds