-
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #688 from Mogztter/automate-docker-push
Automate Docker push on release
- Loading branch information
Showing
1 changed file
with
27 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 |
---|---|---|
|
@@ -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 |