Skip to content

Commit

Permalink
Remove docker login, only push when building main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
evankanderson committed Jun 30, 2023
1 parent 76501ff commit a48f4a3
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# TODO: explicitly record Go & Ko versions in SBOM if not already captured
- uses: ko-build/[email protected]
- run: ko build --platform=all ./cmd/server --image-label=org.opencontainers.image.source=https://github.com/stacklok/mediator,org.opencontainers.image.title="Stacklok Mediator",org.opencontainers.image.licenses=Apache-2.0,org.opencontainers.image.vendor=Stacklok

- run: |
ko build --platform=all --push=${{ github.ref == 'refs/heads/main' }} ./cmd/server \
--image-label=org.opencontainers.image.source=https://github.com/stacklok/mediator,org.opencontainers.image.title="Stacklok Mediator",org.opencontainers.image.licenses=Apache-2.0,org.opencontainers.image.vendor=Stacklok

0 comments on commit a48f4a3

Please sign in to comment.