Skip to content

Build and push

Build and push #37

Workflow file for this run

name: "Build and push"
on:
workflow_run:
workflows: ["Run tests"]
branches: [main]
types:
- completed
jobs:
build:
name: Docker build and push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/github-tag-action@master
id: version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: false
DEFAULT_BUMP: patch
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
tags: |
ghcr.io/reload/bug-yield:latest
ghcr.io/reload/bug-yield:${{ steps.version.outputs.new_tag }}
push: true