Skip to content

Build and push Docker image #5

Build and push Docker image

Build and push Docker image #5

Workflow file for this run

name: Build and push Docker image
on:
push:
branches:
- 'master'
- 'docker'
tags:
- 'v*'
pull_request:
branches:
- 'master'
create:
tags:
- v*
jobs:
docker-upload:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: samhorsfield96/ggcaller
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: docker/Dockerfile
provenance: false
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}