mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Ensure Docker GitHub action only runs for maintenance branches, official tags. Never run for forked repos
This commit is contained in:
15
.github/workflows/docker.yml
vendored
15
.github/workflows/docker.yml
vendored
@@ -1,11 +1,21 @@
|
|||||||
# DSpace Docker image build for hub.docker.com
|
# DSpace Docker image build for hub.docker.com
|
||||||
name: Docker images
|
name: Docker images
|
||||||
|
|
||||||
# Run this Build for all pushes / PRs to current branch
|
# Run this Build for all pushes to 'main' or maintenance branches, or tagged releases.
|
||||||
on: [push, pull_request]
|
# Also run for PRs to ensure PR doesn't break Docker build process
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- 'dspace-**'
|
||||||
|
tags:
|
||||||
|
- 'dspace-**'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
|
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
|
||||||
|
if: github.repository == 'dspace/dspace-angular'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
|
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
|
||||||
@@ -27,6 +37,7 @@ jobs:
|
|||||||
- name: Checkout codebase
|
- name: Checkout codebase
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# https://github.com/docker/setup-buildx-action
|
||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user