Update the docker image once again in the gradle buildfile #3
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: Build Docker image | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- gradle.properties | |
- build.gradle.kts | |
- settings.gradle.kts | |
- src/**/* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Login to container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Docker image | |
run: ./gradlew optimizedDockerBuildNative | |
- name: Push Docker image to container registry | |
run: docker push ghcr.io/jirkavrba/slack-tenor-bot:latest |