Publish rinha-api Docker image #9
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
name: Publish Docker image | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
push_to_registry: | |
name: Push Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Log in to Docker Hub | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Generate Images | |
run: | | |
./gradlew bootBuildImage -p rinha-api | |
./gradlew bootBuildImage -p gateway | |
- name: Tag Images | |
run: | | |
docker tag rinha-gateway:0.0.1-SNAPSHOT marcusdacoregio/rinha-gateway:latest | |
docker tag rinha-api:0.0.1-SNAPSHOT marcusdacoregio/rinha-api:latest | |
- name: Push Images | |
run: | | |
docker push marcusdacoregio/rinha-gateway:latest | |
docker push marcusdacoregio/rinha-api:latest |