Skip to content

Commit

Permalink
TMP: Way to build olbase for testing PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrini committed Dec 16, 2024
1 parent cf08478 commit 1cd6bb3
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/olbase.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: olbase

on:
pull_request:
branches:
- master
schedule:
- cron: '00 16 * * 2'
workflow_dispatch:
Expand Down Expand Up @@ -28,10 +31,22 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
# If on master, use the latest tag, otherwise use the branch name
- name: Master Build and push
uses: docker/build-push-action@v6
if: github.ref == 'refs/heads/master'
with:
context: "."
file: "./docker/Dockerfile.olbase"
tags: openlibrary/olbase:latest
push: true

# If on a PR use the PR number
- name: Test PR Build and push
uses: docker/build-push-action@v6
if: github.event_name == 'pull_request'
with:
context: "."
file: "./docker/Dockerfile.olbase"
tags: openlibrary/olbase:pr-${{ github.event.number }}
push: true

0 comments on commit 1cd6bb3

Please sign in to comment.