Skip to content

2 workflows correct setup #27

2 workflows correct setup

2 workflows correct setup #27

Workflow file for this run

name: Diff Compile
on:
pull_request:
branches:
- main
jobs:
upload-diff:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Generate Diff
run: git diff ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} --name-only > my_diff.txt
- name: Print out diff
shell: bash
run: |
value=`cat my_diff.txt`
echo $value
- name: Upload Diff as Artifact
uses: actions/upload-artifact@v4
with:
retention-days: 1
name: my-diff
path: my_diff.txt