2021-04-06 01:26:35 +08:00
|
|
|
name: quay
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: main
|
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- published
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
main:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-08-10 00:15:24 +08:00
|
|
|
- name: Get current date
|
|
|
|
id: date
|
|
|
|
run: echo "::set-output name=date::$(date --utc +%Y-%m-%dT%H:%M:%SZ)"
|
2021-04-06 01:26:35 +08:00
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Login to Quay
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
registry: quay.io
|
|
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Build and push ${{github.event.release.tag_name }}
|
|
|
|
id: docker_build_release
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
if: ${{ github.event.release.tag_name != '' }}
|
|
|
|
with:
|
|
|
|
push: true
|
|
|
|
tags: quay.io/bakito/adguardhome-sync:latest,quay.io/bakito/adguardhome-sync:${{ github.event.release.tag_name }}
|
|
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
2021-08-10 00:15:24 +08:00
|
|
|
build-args: |
|
|
|
|
VERSION=${{ github.event.release.tag_name }}
|
|
|
|
BUILD=${{ steps.date.outputs.date }}
|
2021-04-06 01:26:35 +08:00
|
|
|
|
|
|
|
- name: Build and push main
|
|
|
|
id: docker_build_main
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
if: ${{ github.event.release.tag_name == '' }}
|
|
|
|
with:
|
|
|
|
push: true
|
|
|
|
tags: quay.io/bakito/adguardhome-sync:main
|
|
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
2021-08-10 00:15:24 +08:00
|
|
|
build-args: |
|
|
|
|
VERSION=main
|
|
|
|
BUILD=${{ steps.date.outputs.date }}
|
2021-04-06 01:26:35 +08:00
|
|
|
- name: Image digest
|
|
|
|
run: echo ${{ steps.docker_build.outputs.digest }}
|