Skip to content

Commit a9d8ffc

Browse files
authored
Merge pull request #10309 from internetarchive/docker-hub-testing-branch
Bring back test branch docker hub builds
2 parents 20c93a2 + d6adf61 commit a9d8ffc

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/olbase.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,22 @@ jobs:
2828
username: ${{ secrets.DOCKERHUB_USERNAME }}
2929
password: ${{ secrets.DOCKERHUB_TOKEN }}
3030

31-
- name: Build and push
31+
# If on master, use the latest tag, otherwise use the branch name
32+
- name: Master Build and push
3233
uses: docker/build-push-action@v6
34+
if: github.ref == 'refs/heads/master'
3335
with:
3436
context: "."
3537
file: "./docker/Dockerfile.olbase"
3638
tags: openlibrary/olbase:latest
3739
push: true
40+
41+
# If on another branch, use the branch name -- just the branch name, not the full ref
42+
- name: Test Branch Build and push
43+
uses: docker/build-push-action@v6
44+
if: github.ref != 'refs/heads/master'
45+
with:
46+
context: "."
47+
file: "./docker/Dockerfile.olbase"
48+
tags: openlibrary/olbase:${{ github.ref_name }}
49+
push: true

0 commit comments

Comments
 (0)