Skip to content

Commit

Permalink
revert 'reenable manual build
Browse files Browse the repository at this point in the history
workflow and minor fixes' shouldn't be there
  • Loading branch information
sirux88 committed Sep 21, 2023
1 parent b3793f4 commit 56c2d0e
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions .github/workflows/docker-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,12 @@ on:
- "v*.*.*"

workflow_dispatch:
inputs:
dockerPush:
description: 'Push image to docker hub?'
required: true
type: boolean
default: false

schedule:
# * is a special character in YAML so you have to quote this string
# Run every day at 5:24 UTC - build 'latest' docker containers
- cron: "24 17 * * *"
env:
DOCKER_PUSH: true

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -33,10 +27,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Set DOCKER_PUSH for workflow_dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
run: echo "DOCKER_PUSH=${{ github.event.inputs.dockerPush }}" >> $GITHUB_ENV

- name: Populate Docker metadata
id: meta
uses: docker/metadata-action@v4
Expand All @@ -55,7 +45,6 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v2
if: ${{env.DOCKER_PUSH == 'true'}}
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -66,11 +55,11 @@ jobs:
file: ./containers/docker/pwpush/Dockerfile
platforms: linux/amd64,linux/arm64
provenance: false
push: ${{env.DOCKER_PUSH == 'true'}}
push: true
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/pwpush:buildcache
cache-to: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/pwpush:buildcache,mode=max,ignore-error=${{env.DOCKER_PUSH == 'false'}}
cache-to: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/pwpush:buildcache,mode=max

# 'buildObsolete'-job can be completly removed after dropping support
# for old docker images.
Expand All @@ -94,10 +83,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Set DOCKER_PUSH for workflow_dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
run: echo "DOCKER_PUSH=${{ github.event.inputs.dockerPush }}" >> $GITHUB_ENV

- name: Populate Docker metadata
id: meta
uses: docker/metadata-action@v4
Expand All @@ -116,7 +101,6 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v2
if: ${{env.DOCKER_PUSH == 'true'}}
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -127,7 +111,7 @@ jobs:
file: ./containers/docker/pwpush-${{ matrix.dbType }}/Dockerfile
platforms: linux/amd64,linux/arm64
provenance: false
push: ${{env.DOCKER_PUSH == 'true'}}
push: true
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
build-args: |
Expand Down

0 comments on commit 56c2d0e

Please sign in to comment.