drop table #28
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: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get current date | |
env: | |
TZ: 'Asia/Tokyo' | |
id: get-current-date | |
run: echo "value=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT | |
- name: Create Tag | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git tag -a v-${{ github.ref_name }}-${{ steps.get-current-date.outputs.value }} -m "Released at ${{ steps.get-current-date.outputs.value }}" | |
- name: Setup Scala | |
uses: olafurpg/setup-scala@v13 | |
with: | |
java-version: [email protected] | |
- name: Log in to Docker Hub | |
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push | |
run: sbt bot/docker:publish batch/docker:publish | |
- name: Push tag | |
run: git push origin v-${{ github.ref_name }}-${{ steps.get-current-date.outputs.value }} |