forked from migueravila/Bento
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(ci): OpenRegistry build and push
- Loading branch information
1 parent
9f5f1b7
commit 3d89636
Showing
1 changed file
with
46 additions
and
0 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,46 @@ | ||
name: "Build Container Image" | ||
on: [push, pull_request] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-docker: | ||
name: "Build Container image" | ||
runs-on: ubuntu-latest | ||
env: | ||
CONTAINER_IMAGE_NAME: openregistry.dev/${{ github.repository }}:${{ github.sha }} | ||
|
||
steps: | ||
- name: Checkout the branch | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
id: buildx | ||
with: | ||
install: true | ||
version: latest | ||
|
||
- name: Login to OpenRegistry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: openregistry.dev | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
platforms: linux/amd64 | ||
push: true | ||
target: runner | ||
tags: ${{ env.CONTAINER_IMAGE_NAME }} |