Skip to content

v4.1: bogus testing GHA DNM #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: v4.1.x
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 39 additions & 4 deletions .github/workflows/git-commit-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,47 @@ jobs:
name: Git commit checker
runs-on: ubuntu-latest
steps:
- name: Check out the code
- name: show info
env:
INFO: ${{ toJSON(github) }}
HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
BASE_REPO: ${{ github.event.pull_request.base.repo.full_name }}
run: |
echo head repo: $HEAD_REPO
echo base repo: $BASE_REPO
echo "github context: $INFO"

- name: Check out the code-base
uses: actions/checkout@v2
with:
path: base
repository: ${{ github.event.pull_request.base.repo.full_name }}
ref: master
# Get everything from the base repo
fetch-depth: 0

- name: Check out the code-head
uses: actions/checkout@v2
with:
# Get all branches and history
fetch-depth: 0
repository: ${{ github.event.pull_request.head.repo.full_name }}
path: head
ref: ${{ github.event.pull_request.head.ref }}

- name: run some git commands
run: |
set -x
cd $GITHUB_WORKSPACE/base
git remote -v
git log -n 1
# This commit is not yet merged in the base repo
git show 7cc6aea9fa28bf7284bca12b19cce9a763739772 || /bin/true
echo ===============
cd $GITHUB_WORKSPACE/head
git remote -v
git log -n 1
# This commit is not yet merged in the base repo
git show 7cc6aea9fa28bf7284bca12b19cce9a763739772 || /bin/true

- name: Setup Python
uses: actions/setup-python@v2
with:
Expand All @@ -29,6 +64,6 @@ jobs:
run: pip install gitpython PyGithub

- name: Check all git commits
run: $GITHUB_WORKSPACE/.github/workflows/git-commit-checks.py
run: $GITHUB_WORKSPACE/head/.github/workflows/git-commit-checks.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}