Skip to content

ci

ci #344

Workflow file for this run

name: ci
on:
workflow_dispatch:
schedule:
- cron: '23 13 * * *'
push:
branches:
- 'main'
- 'dev'
tags:
- 'v*.*.*'
pull_request:
branches:
- 'main'
- 'dev'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build pull request
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v4
with:
context: src
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: false
tags: flungo/avahi:pull_request
- name: Build and push
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v4
with:
context: src
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: flungo/avahi:${{ github.ref_name }}
- name: Build and push latest
if: github.ref_name == 'main'
uses: docker/build-push-action@v4
with:
context: src
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: flungo/avahi:latest