-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
309b18d
commit 8b28bc3
Showing
1 changed file
with
35 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,35 @@ | ||
name: Release Chaos Workers | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish-image: | ||
runs-on: ubuntu-latest | ||
env: | ||
VERSION: ${{ github.event.release.name }} | ||
steps: | ||
- run: | | ||
echo "Name: ${{ env.VERSION }}" | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/[email protected] | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
- name: Package with Maven | ||
run: mvn -B package -DskipTests -f chaos-workers/chaos-worker/pom.xml | ||
- name: Build docker image | ||
id: build-image | ||
working-directory: chaos-workers/ | ||
env: | ||
DOCKER_BUILDKIT: 1 | ||
REGISTRY: gcr.io | ||
REPOSITORY: zeebe-io/zeebe-chaos-worker | ||
IMAGE_TAG: ${{ env.VERSION }} | ||
run: | | ||
echo '${{ secrets.DOCKER_GCR }}' | docker login -u _json_key --password-stdin https://gcr.io | ||
docker build . -t "$REGISTRY/$REPOSITORY:latest" -t "$REGISTRY/$REPOSITORY:$IMAGE_TAG" --build-arg TOKEN="${{ secrets.SA_SECRET }}" | ||
docker push "$REGISTRY/$REPOSITORY:latest" | ||
docker push "$REGISTRY/$REPOSITORY:$IMAGE_TAG" |