Skip to content

Commit

Permalink
ci: action for release
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisKujawa authored Nov 30, 2021
1 parent 309b18d commit 8b28bc3
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publishWorkerImage.yml
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"

0 comments on commit 8b28bc3

Please sign in to comment.