Skip to content

Sample2

Sample2 #6

Workflow file for this run

name: Check changed files
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
permissions:
contents: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
steps:
- name: Checkout current repo
uses: actions/checkout@v3
- name: Get file changes
id: file_changes
uses: trilom/[email protected]
- name: test
run: |
cat $HOME/files.json
cat $HOME/files_modified.json
cat $HOME/files_added.json
cat $HOME/files_removed.json
echo '${{ steps.file_changes.outputs.files}}'
echo '${{ steps.file_changes.outputs.files_modified}}'
echo '${{ steps.file_changes.outputs.files_added}}'
echo '${{ steps.file_changes.outputs.files_removed}}'
- name: Get folders
id: folders
run: |
content=$(jq ".[]" $HOME/files.json | sed 's/\/[^/]*$/\//' | sed -e 's/^"//' -e 's/"$//' | grep '.*\/$' | uniq | jq -R -s -c 'split("\n")[:-1]')
echo "::set-output name=folders::$content"
outputs:
folders: ${{ steps.folders.outputs.folders }}