Merge pull request #376 from evenfurther/renovate/com.eed3si9n-sbt-as… #208
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: Docker push | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
docker-push: | |
name: Build and push to docker hub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
tags: rfc1149/ausweisbot:latest | |
gen-artifacts: | |
name: Generate and upload the jar and commands list artifacts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Ivy2 cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.ivy2 | |
key: ivy2-files | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Scala | |
uses: olafurpg/setup-scala@v14 | |
with: | |
java-version: "adopt@1.11" | |
- name: Coursier cache | |
uses: coursier/cache-action@v6 | |
- name: SBT artifacts | |
run: sbt assembly genCommands | |
- name: Upload ausweis.jar artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ausweis.jar | |
path: ausweis.jar | |
- name: Upload commands.txt artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: commands.txt | |
path: commands.txt | |
notify: | |
name: Notify via Telegram | |
runs-on: ubuntu-latest | |
needs: [docker-push, gen-artifacts] | |
steps: | |
- name: Notify | |
uses: appleboy/telegram-action@master | |
with: | |
to: ${{ secrets.TELEGRAM_TO }} | |
token: ${{ secrets.TELEGRAM_TOKEN }} | |
message: > | |
The new docker image for rfc1149/ausweisbot (version ${{ github.sha }}) | |
has been pushed and artifacts are available |