-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Revert "Build and push image to my own ghcr repo""
This reverts commit 6c8d2b1.
- Loading branch information
1 parent
8951b30
commit 31f3d59
Showing
6 changed files
with
52 additions
and
299 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Build Docker Image | ||
|
||
on: | ||
push: | ||
branches: | ||
- master # or your default branch name | ||
|
||
env: | ||
COMMIT_HASH: ${{ github.sha }} | ||
|
||
jobs: | ||
setup-build-publish-deploy: | ||
name: Build images | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get commit hash | ||
run: echo "$COMMIT_HASH" | ||
|
||
# Set up buildx for multi-platform builds | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@c5ffa2a61740d9877bd1f40899a87c8ec93b0d9f | ||
|
||
- name: Docker Setup Buildx | ||
uses: docker/setup-buildx-action@bea6a01aa40b4d58b0382d47e1c4a70137af67b1 | ||
with: | ||
config-inline: | | ||
[worker.oci] | ||
enabled = true | ||
platforms = [ "linux/amd64", "linux/arm64" ] | ||
# Login to GHCR | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Build and push to GHCR | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: | | ||
ghcr.io/${{ github.repository_owner }}/robusta:${{ env.COMMIT_HASH }} | ||
ghcr.io/${{ github.repository_owner }}/robusta:latest |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.