add filter for token empty #3
Workflow file for this run
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: Production | |
on: | |
pull_request: | |
branches: ["develop"] | |
push: | |
## | |
# DO NOT FORGET TO UPDATE THE "if" STATEMENTS BELOW! | |
## | |
tags: ["*"] | |
branches: ["develop"] | |
jobs: | |
build-and-deploy: | |
name: Build and Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Login to Quay.io | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_IO_BOT_USERNAME }} | |
password: ${{ secrets.QUAY_IO_BOT_PASSWORD }} | |
- uses: olegtarasov/[email protected] | |
id: tag-name | |
- uses: benjlevesque/[email protected] | |
id: short-sha | |
with: | |
length: 7 | |
- name: Build and publish tag docker image | |
uses: docker/build-push-action@v3 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
context: . | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: quay.io/subscan-explorer/chatroom:${{ env.GIT_TAG_NAME }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Build and publish sha docker image | |
uses: docker/build-push-action@v3 | |
if: startsWith(github.ref, 'refs/tags/') == false && github.ref == 'refs/heads/develop' | |
with: | |
context: . | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: quay.io/subscan-explorer/chatroom:sha-${{ env.SHA }}-${{ github.run_number }} | |
labels: ${{ steps.meta.outputs.labels }} |