-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kartik Joshi <[email protected]>
- Loading branch information
1 parent
730f7ed
commit 21705eb
Showing
1 changed file
with
44 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,44 @@ | ||
name: Build and Push kbs Image | ||
|
||
on: | ||
push: | ||
branches: | ||
- kartikjoshi21/kbs-image | ||
|
||
jobs: | ||
build_and_push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Get Commit SHA | ||
id: commit_sha | ||
run: echo "::set-output name=sha::$(git rev-parse --short ${{ github.sha }})" | ||
|
||
- name: Cache Docker layers | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cache | ||
key: ${{ runner.os }}-docker-${{ hashFiles('**/Dockerfile') }} | ||
if: runner.os == 'Linux' | ||
|
||
- name: Login to quay Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
|
||
- name: Build Container Image | ||
run: | | ||
commit_sha=${{ steps.commit_sha.outputs.sha }} | ||
DOCKER_BUILDKIT=1 docker build -t quay.io/karikjoshi21/kbs:coco-as-${commit_sha} . -f docker/Dockerfile --push; \ | ||
DOCKER_BUILDKIT=1 docker build -t quay.io/karikjoshi21/kbs:coco-as-openssl-${commit_sha} --build-arg KBS_FEATURES=coco-as-builtin,openssl,resource,opa . -f docker/Dockerfile --push; \ | ||
DOCKER_BUILDKIT=1 docker build -t quay.io/karikjoshi21/kbs:coco-as-grpc-${commit_sha} . -f docker/Dockerfile.coco-as-grpc --push |