Skip to content

feat(patch): add ignore-not-found option #8

feat(patch): add ignore-not-found option

feat(patch): add ignore-not-found option #8

Workflow file for this run

name: Push on docker hub
on:
push:
tags: [ '*' ]
branches: [ main, master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Major tag
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master'
id: major-tag
run: echo "::set-output name=tag::$(git describe --tags | grep -o '^[0-9]*')"
- name: Minor tag
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master'
id: minor-tag
run: echo "::set-output name=tag::$(git describe --tags | grep -o '^[0-9]*\.[0-9]*')"
- name: Patch tag
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master'
id: patch-tag
run: echo "::set-output name=tag::$(git describe --tags | grep -o '^[0-9]*\.[0-9]*\.[0-9]*')"
- 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@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build image latest/tag and push
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master'
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/386,linux/amd64,linux/arm64
push: true
tags: |
joxit/wof:latest
joxit/wof:${{steps.major-tag.outputs.tag}}
joxit/wof:${{steps.minor-tag.outputs.tag}}
joxit/wof:${{steps.patch-tag.outputs.tag}}
- name: Build image main and push
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/386,linux/amd64,linux/arm64
push: true
tags: |
joxit/wof:main
joxit/wof:master