Skip to content

Commit

Permalink
Pushing the docker image for mantis publisher (#615)
Browse files Browse the repository at this point in the history
* Pushing the docker image for mantis publisher

* Caching the docker layers

* Changing when the image gets published

---------

Co-authored-by: Sundaram Ananthanarayanan <[email protected]>
  • Loading branch information
sundargates and sundargates authored Jan 18, 2024
1 parent f923c87 commit b907c68
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/push-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
paths:
- ./mantis-control-plane/mantis-control-plane-server/build.gradle
- ./mantis-server/mantis-server-agent/build.gradle
- ./mantis-examples/mantis-examples-mantis-publish-sample/build.gradle
- .github/workflows/push-docker-image.yml
push:
tags:
Expand All @@ -29,6 +30,10 @@ jobs:
image: "netflixoss/mantisagent"
target: mantis-server:mantis-server-agent
workingDirectory: ./mantis-server/mantis-server-agent/build/docker
- dockerfile: ./mantis-examples/mantis-examples-mantis-publish-sample/build/docker/Dockerfile
image: "netflixoss/mantis-publisher-sample"
target: mantis-examples:mantis-examples-mantis-publish-sample
workingDirectory: ./mantis-examples/mantis-examples-mantis-publish-sample/build/docker
permissions:
contents: read
packages: write
Expand Down Expand Up @@ -82,6 +87,15 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push Docker images
uses: docker/build-push-action@v3
with:
Expand All @@ -90,3 +104,5 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

0 comments on commit b907c68

Please sign in to comment.