Merge pull request #4 from anshul7665/anshulss/buildimage

remove comments
This commit is contained in:
Anshul Sharma 2025-04-23 22:01:58 +05:30 committed by GitHub
commit 92af9de733
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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