diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4de00a30..4356981b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,13 +2,9 @@ name: docker-build on: workflow_dispatch: - push: - paths-ignore: - - 'docs/**' - - 'README.md' - branches: - - 'master' - - 'staging' + schedule: + - cron: '0 0 * * *' # runs daily at 00:00 + release: types: [published] @@ -32,7 +28,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Push master (to staging) - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/master' && env.NEW_COMMIT_COUNT > 0 uses: docker/build-push-action@v2 with: push: true @@ -43,7 +39,7 @@ jobs: - name: Get version id: get_version if: startsWith(github.ref, 'refs/tags/v') - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} + run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT - name: Push release if: startsWith(github.ref, 'refs/tags/v')