Skip to content

Dev/cvadrevu/GitHub actions #9

Dev/cvadrevu/GitHub actions

Dev/cvadrevu/GitHub actions #9

Workflow file for this run

name: PR Checks
# Controls when the workflow will run
on:
pull_request: {}
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch: {}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch_depth: 100
- name: Fetch base_ref
run: git fetch -depth=1 origin ${{ github.base_ref }}
# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: format-patch
run: |
common_ancestor=$(git merge-base HEAD origin/${{ github.base_ref }})
echo $common_ancestor