-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ebffa3
commit 76501ff
Showing
3 changed files
with
15 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,38 +16,6 @@ jobs: | |
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- 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 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ghcr.io/stacklok/mediator | ||
tags: | | ||
type=semver,prefix=v,pattern={{version}} | ||
type=sha,format=long | ||
# set latest tag for default branch | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
labels: | | ||
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 | ||
- name: Build container images and push | ||
id: docker_build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
# Only push to the registry if we're building the default branch | ||
push: ${{ github.ref == 'refs/heads/main' }} | ||
# ARM builds take a long time due to QEMU emulation. For PRs | ||
# we only build amd64, and for the default branch we build both. | ||
platforms: linux/amd64${{ github.event_name != 'pull_request' && ', linux/arm64' || '' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters