fix linter (#419) #51
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 | |
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 | |
build-args: | | |
MoiraVersion=${{env.DOCKER_TAG}} | |
GIT_COMMIT=${{github.sha}} | |
push: true | |
tags: moira/web2.0-nightly:${{env.DOCKER_TAG}} | |
- name: Comment PR with build tag | |
uses: mshick/add-pr-comment@v2 | |
if: always() | |
with: | |
message-success: | |
"Build and push Docker images with tag: ${{env.DOCKER_TAG}}" | |
message-failure: | |
"Builds images failed. See action log for details" |