TODO: Experiment with GitHub Actions
-
Another repository we have not included yet.
-
And another one: repository
-
And a demo
name: Experiment
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: Build
steps:
- uses: actions/checkout@v6
# with:
# fetch-depth: 21
#
# - name: Single command
# run: echo Hello World!
#
# - name: uname - pwd - ls
# run: |
# uname
# echo "-----"
# pwd
# echo "-----"
# ls -l
#
# - name: Show env
# run: |
# printenv | sort
#
# - name: Changed files
# run: |
# echo 2
# git diff --name-only HEAD~2
# echo 20
# git diff --name-only HEAD~20
# echo 21
# git diff --name-only HEAD~21
#
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v47
# NOTE: `since_last_remote_commit: true` is implied by default and falls back to the previous local commit.
- 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"
done