Update Dockerfile #228
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Docker # | |
on: | |
push: | |
branches: | |
- master | |
- fpm-noalpine | |
schedule: | |
- cron: '0 2 * * 0' # Weekly on Sundays at 02:00 | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
outputs: | |
image-needs-updating: ${{ steps.check.outputs.needs-updating }} | |
steps: | |
- name: Docker Image Update Checker | |
id: check | |
uses: lucacome/docker-image-update-checker@v1.2.1 | |
with: | |
base-image: library/nextcloud:latest | |
image: gymnae/owncloud:latest | |
if: ${{ github.event_name == 'schedule' }} | |
build: | |
needs: check | |
if: ${{ github.event_name != 'schedule' || needs.check.outputs.image-needs-updating == 'true' }} | |
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 | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- | |
name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
- | |
name: Publish to Registry | |
uses: elgohr/Publish-Docker-Github-Action@v5 | |
with: | |
name: Gymnae/owncloud | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
cache: ${{ github.event_name != 'schedule' }} | |
- | |
uses: gautamkrishnar/keepalive-workflow@v1 # using the workflow with default settings |