feature: add pre-commit hooks (#894) #128
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 nightly | |
on: | |
push: | |
branches: | |
- "master" | |
jobs: | |
publish: | |
name: Publish images | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
servis: [api, checker, cli, notifier, filter] | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- uses: docker/login-action@v2 | |
name: Login to DockerHub | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Build docker tag | |
run: echo "DOCKER_TAG=$(echo $(date '+%Y-%m-%d').${GITHUB_SHA:0:7})" >> $GITHUB_ENV | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
file: ./Dockerfile.${{matrix.servis}} | |
build-args: | | |
MoiraVersion=${{env.DOCKER_TAG}} | |
GIT_COMMIT=${{github.sha}} | |
push: true | |
tags: moira/${{matrix.servis}}-nightly:${{env.DOCKER_TAG}} | |
- name: Comment PR with build tag | |
uses: mshick/add-pr-comment@v2 | |
if: always() | |
with: | |
refresh-message-position: true | |
message-success: | |
"Build and push Docker images with tag: ${{env.DOCKER_TAG}}" | |
message-failure: | |
"Builds images failed. See action log for details" | |