Skip to content

Commit

Permalink
split scheduled and release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
  • Loading branch information
mblaschke committed May 9, 2021
1 parent 1b17e42 commit e4efdcd
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: "Release: docker"

on:
schedule:
- cron: '0 6 * * 1'
push:
branches:
- '**'
Expand All @@ -23,23 +21,23 @@ jobs:

- 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
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to Quay
uses: docker/login-action@v1
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/scheduled-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "Scheduled: docker"

on:
schedule:
- cron: '0 6 * * 1'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: webdevops/azure-metrics-exporter,quay.io/webdevops/azure-metrics-exporter
#tag-sha: true

- 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: Login to Quay
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm,linux/arm64,linux/ppc64le
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

0 comments on commit e4efdcd

Please sign in to comment.