[pre-commit.ci] pre-commit autoupdate #305
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 | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- develop | |
paths: | |
- "**" | |
pull_request: | |
branches: | |
- develop | |
release: | |
types: [published] | |
env: | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build_n_push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Git | |
uses: actions/checkout@v2 | |
- name: Determine Docker info from repo | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: ${{ env.IMAGE_NAME }} | |
- name: Log the image labels | |
run: echo '${{ steps.meta.outputs.labels }}' | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.GADOCKERSVC_USERNAME }} | |
password: ${{ secrets.GADOCKERSVC_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
builder: ${{ steps.buildx.outputs.name }} | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
ENVIRONMENT=deployment |