diff --git a/.forgejo/workflows/update.yaml b/.forgejo/workflows/update.yaml new file mode 100644 index 0000000..4c9b0d3 --- /dev/null +++ b/.forgejo/workflows/update.yaml @@ -0,0 +1,40 @@ +on: [push] +jobs: + automate-ifc: + runs-on: self-hosted + steps: + - run: source ~/.bashrc + - uses: https://github.com/actions/checkout@v4 + with: + fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. + - name: Get changed files + id: changed-files + uses: https://github.com/tj-actions/changed-files@v42 + - name: List all changed files + env: + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + run: | + for file in ${ALL_CHANGED_FILES}; do + echo "$file was changed" + filename=$(basename -- "$file") + extension="${filename##*.}" + if [[ $extension == "py" ]] + then + echo "exec python file" + python3 $file + else + echo $extension + fi + done + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." + - run: uname -a + - run: whoami + - run: pwd + - run: xx + - run: cd ~/SOURCES/FORDJ/fordjx/ifchack && make extract duplex +