Skip to content

Commit

Permalink
remove hardcoded repository paths
Browse files Browse the repository at this point in the history
  • Loading branch information
omrishiv committed May 13, 2024
1 parent e9ee1b4 commit 28de746
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ jobs:
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: |
${{ env.REGISTRY }}
tags: |
${{ env.IMAGE_NAME }}:${{ github.sha }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
Expand All @@ -46,7 +49,7 @@ jobs:
with:
context: .
push: true
tags: ghcr.io/omrishiv/backstage-app:${{ github.sha }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,3 @@ COPY --chown=node:node app-config.yaml ./
ENV NODE_ENV production

CMD ["node", "packages/backend", "--config", "app-config.yaml"]
LABEL org.opencontainers.image.source=https://github.com/OmriShiv/backstage-app

0 comments on commit 28de746

Please sign in to comment.