Skip to content

Commit

Permalink
Update docker workflows to support parsec
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Maurer <maurer.mi@northeastern.edu>
  • Loading branch information
maurermi authored and HalosGhost committed Jan 22, 2024
1 parent c3ea4df commit 3d003bf
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/docker-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,21 @@ jobs:
type=ref,event=pr
type=sha
- name: Docker meta parsec (merge)
id: meta-parsec
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/${{ github.repository }}-parsec
# generate Docker tags based on the following events/attributes
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=ref,event=branch
type=ref,event=pr
type=sha
- name: Build and push twophase (merge)
uses: docker/build-push-action@v2
with:
Expand All @@ -116,3 +131,14 @@ jobs:
labels: ${{ steps.meta-atomizer.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build and push parsec (merge)
uses: docker/build-push-action@v2
with:
context: .
target: parsec
push: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
tags: ${{ steps.meta-parsec.outputs.tags }}
labels: ${{ steps.meta-parsec.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
8 changes: 8 additions & 0 deletions .github/workflows/docker-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,18 @@ jobs:
if: ${{ steps.changed-files-specific.outputs.any_changed == 'true' }}
run: docker build --target atomizer --build-arg BASE_IMAGE=opencbdc-tx-base-local .

- name: Build parsec docker image (pull_request with base changes)
if: ${{ steps.changed-files-specific.outputs.any_changed == 'true' }}
run: docker build --target parsec --build-arg BASE_IMAGE=opencbdc-tx-base-local .

- name: Build twophase docker image (pull_request with no base changes)
if: ${{ steps.changed-files-specific.outputs.any_changed == 'false' }}
run: DOCKER_BUILDKIT=1 docker build --target twophase .

- name: Build atomizer docker image (pull_request with no base changes)
if: ${{ steps.changed-files-specific.outputs.any_changed == 'false' }}
run: DOCKER_BUILDKIT=1 docker build --target atomizer .

- name: Build parsec docker image (pull_request with no base changes)
if: ${{ steps.changed-files-specific.outputs.any_changed == 'false' }}
run: DOCKER_BUILDKIT=1 docker build --target parsec .
3 changes: 3 additions & 0 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ jobs:

- name: Build atomizer docker image (push/pull_request with base changes)
run: docker build --target atomizer --build-arg BASE_IMAGE=opencbdc-tx-base-local -t opencbdc-tx-atomizer-local .

- name: Build parsec docker image (push/pull_request with base changes)
run: docker build --target parsec --build-arg BASE_IMAGE=opencbdc-tx-base-local -t opencbdc-tx-parsec-local .

0 comments on commit 3d003bf

Please sign in to comment.