Skip to content

Commit

Permalink
Merge pull request #688 from Mogztter/automate-docker-push
Browse files Browse the repository at this point in the history
Automate Docker push on release
  • Loading branch information
ggrossetie authored Apr 13, 2021
2 parents 8cc9377 + 9a61438 commit aaa6822
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,30 @@ jobs:
asset_path: server/target/kroki-server.jar
asset_name: kroki-server-${{ env.RELEASE_VERSION }}.jar
asset_content_type: application/zip
publish_dockerhub:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Set up JDK 11
uses: actions/[email protected]
with:
java-version: 11
- name: Install Java dependencies
run: make installLocalDependencies
- name: Build Java server
run: make buildServer
- name: Setup Docker
# taken from https://github.com/docker/github-actions/blob/0f18e2abad9a4ac2963d2516246787375b5ec917/Dockerfile#L32
run: curl -fL https://download.docker.com/linux/static/stable/x86_64/docker-20.10.4.tgz | tar xzO docker/docker > docker && sudo mv -f docker /usr/bin/docker && sudo chmod +x /usr/bin/docker
- name: Build Docker images
run: make buildDockerImages
- name: Release Docker images
run: make releaseDockerImages
- name: Login to Docker Hub
run: |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: Push Docker images
run: make pushDockerImages

0 comments on commit aaa6822

Please sign in to comment.