diff --git a/.github/workflows/03-core-features--02-step-types.yaml b/.github/workflows/03-core-features--02-step-types.yaml index 8abea6b1..78b5835b 100644 --- a/.github/workflows/03-core-features--02-step-types.yaml +++ b/.github/workflows/03-core-features--02-step-types.yaml @@ -8,11 +8,16 @@ jobs: runs-on: ubuntu-24.04 steps: - run: echo "Hello from an inline bash script in a GitHub Action Workflow!" + - run: echo $SHELL say-hello-inline-python: runs-on: ubuntu-24.04 steps: - - run: print("Hello from an inline python script in a GitHub Action Workflow!") + - run: | + import sys + print("Hello from Python") + print("Running with:", sys.executable) + print("Hello from an inline python script in a GitHub Action Workflow!") shell: python say-hello-action: diff --git a/.github/workflows/03-core-features--06-passing-data.yaml b/.github/workflows/03-core-features--06-passing-data.yaml index a0f4907f..1ceaa8ae 100644 --- a/.github/workflows/03-core-features--06-passing-data.yaml +++ b/.github/workflows/03-core-features--06-passing-data.yaml @@ -16,13 +16,16 @@ jobs: # 1) Step output (for job output) echo "foo=${foo}" >> "$GITHUB_OUTPUT" + echo "foo1=${foo1}" # 2) Job-scoped environment variable echo "FOO=${foo}" >> "$GITHUB_ENV" + echo "foo1=${foo}" >> "$GITHUB_ENV" - name: Inspect values inside producer run: | echo "FOO (set via GITHUB_ENV): $FOO" + echo "foo1 (set via GITHUB_ENV): $foo1" echo "foo (step output): ${{ steps.generate-foo.outputs.foo }}" consumer: diff --git a/.github/workflows/04-advanced-features--03-caching.yaml b/.github/workflows/04-advanced-features--03-caching.yaml index 5a8874af..cc3aecd3 100644 --- a/.github/workflows/04-advanced-features--03-caching.yaml +++ b/.github/workflows/04-advanced-features--03-caching.yaml @@ -22,7 +22,7 @@ jobs: # Populate directory only on miss - name: Populate cache directory - if: steps.demo-cache.outputs.cache-hit != 'true' +# if: steps.demo-cache.outputs.cache-hit != 'true' run: | echo "Cache miss – generating contents" mkdir -p demo-cache diff --git a/.github/workflows/04-advanced-features--04-github-permissions.yaml b/.github/workflows/04-advanced-features--04-github-permissions.yaml index 11105ad2..73aaff10 100644 --- a/.github/workflows/04-advanced-features--04-github-permissions.yaml +++ b/.github/workflows/04-advanced-features--04-github-permissions.yaml @@ -36,14 +36,14 @@ on: jobs: read-only-pr: runs-on: ubuntu-24.04 - permissions: - pull-requests: read # Can read PR data only continue-on-error: true # Avoids failing entire workflow steps: - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0 - name: List the first 5 open PRs (allowed) - run: gh pr list --limit 5 + run: | + gh pr list --limit 5 + echo "done" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -51,6 +51,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + echo "abc: ${{ secrets.GITHUB_TOKEN }}" gh pr edit 1 --add-label "documentation" - name: Confirm the failure diff --git a/.gitignore b/.gitignore index 4a48538f..d115a808 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.DS_store \ No newline at end of file +.DS_store +.idea/ \ No newline at end of file diff --git a/03-core-features/filters/excluded-file.txt b/03-core-features/filters/excluded-file.txt index e69de29b..30d74d25 100644 --- a/03-core-features/filters/excluded-file.txt +++ b/03-core-features/filters/excluded-file.txt @@ -0,0 +1 @@ +test \ No newline at end of file diff --git a/03-core-features/filters/included-file-test b/03-core-features/filters/included-file-test new file mode 100644 index 00000000..30d74d25 --- /dev/null +++ b/03-core-features/filters/included-file-test @@ -0,0 +1 @@ +test \ No newline at end of file diff --git a/03-core-features/filters/included-file.md b/03-core-features/filters/included-file.md index e69de29b..d4309e0a 100644 --- a/03-core-features/filters/included-file.md +++ b/03-core-features/filters/included-file.md @@ -0,0 +1 @@ +test 123 123 123 \ No newline at end of file diff --git a/scripts/git-commit.sh b/scripts/git-commit.sh new file mode 100755 index 00000000..393b593f --- /dev/null +++ b/scripts/git-commit.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Exit if any command fails +set -e + +# Check if commit message is provided +if [ -z "$1" ]; then + echo "Usage: $0 \"your commit message\"" + exit 1 +fi + +COMMIT_MSG="$1" + +# Add all changes +git add . + +# Commit +git commit -m "$COMMIT_MSG" + +# Push (default branch) +git push + +echo "✅ Changes committed and pushed with message: $COMMIT_MSG"