Skip to content

Merge pull request #21 from camptocamp/fix_ci #104

Merge pull request #21 from camptocamp/fix_ci

Merge pull request #21 from camptocamp/fix_ci #104

Workflow file for this run

---
name: Build PostgreSQL images
on:
# trigger every sunday morning
schedule:
- cron: "2 2 * * SUN"
# trigger on PR merge and push to master branch
push:
branches:
- master
# trigger on PR
pull_request:
branches:
- master
jobs:
build-and-push:
if: github.event_name == 'push' || github.event_name == 'schedule'
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login docker.io -u dockerc2c --password-stdin
- name: Build and push with Docker
run: make PUSH_DOCKER_HUB=true PUSH_GHCR=true
build-on-pr:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build without pushing
run: make