Skip to content

Commit

Permalink
Merge pull request DSpace#8941 from tdonohue/update_actions
Browse files Browse the repository at this point in the history
Update GitHub Actions for 7.x maintenance
  • Loading branch information
tdonohue authored Jul 6, 2023
2 parents 75e7f55 + 3ac6603 commit 503d55f
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 32 deletions.
26 changes: 0 additions & 26 deletions .github/disabled-workflows/pull_request_opened.yml

This file was deleted.

10 changes: 7 additions & 3 deletions .github/workflows/codescan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
# because CodeQL requires a fresh build with all tests *disabled*.
name: "Code Scanning"

# Run this code scan for all pushes / PRs to main branch. Also run once a week.
# Run this code scan for all pushes / PRs to main or maintenance branches. Also run once a week.
on:
push:
branches: [ main ]
branches:
- main
- 'dspace-**'
pull_request:
branches: [ main ]
branches:
- main
- 'dspace-**'
# Don't run if PR is only updating static documentation
paths-ignore:
- '**/*.md'
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/label_merge_conflicts.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# This workflow checks open PRs for merge conflicts and labels them when conflicts are found
name: Check for merge conflicts

# Run whenever the "main" branch is updated
# NOTE: This means merge conflicts are only checked for when a PR is merged to main.
# Run this for all pushes (i.e. merges) to 'main' or maintenance branches
on:
push:
branches: [ main ]
branches:
- main
- 'dspace-**'
# So that the `conflict_label_name` is removed if conflicts are resolved,
# we allow this to run for `pull_request_target` so that github secrets are available.
pull_request_target:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/pull_request_opened.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This workflow runs whenever a new pull request is created
name: Pull Request opened

# Only run for newly opened PRs against the "main" or maintenance branches
# We allow this to run for `pull_request_target` so that github secrets are available
# (This is required to assign a PR back to the creator when the PR comes from a forked repo)
on:
pull_request_target:
types: [ opened ]
branches:
- main
- 'dspace-**'

permissions:
pull-requests: write

jobs:
automation:
runs-on: ubuntu-latest
steps:
# Assign the PR to whomever created it. This is useful for visualizing assignments on project boards
# See https://github.com/toshimaru/auto-author-assign
- name: Assign PR to creator
uses: toshimaru/[email protected]

0 comments on commit 503d55f

Please sign in to comment.