Skip to content

Improving logic and extensibility #66

Improving logic and extensibility

Improving logic and extensibility #66

Workflow file for this run

---
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