Skip to content

Commit

Permalink
Using push event modified files
Browse files Browse the repository at this point in the history
  • Loading branch information
a8trejo committed Apr 2, 2024
1 parent 25731b7 commit baa19ab
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Actions Debugging Scripts
on:
workflow_dispatch:

env:
REPO_NAME:
jobs:
hello-world:
if: false
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/push-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Push Event Files
on:
push:

jobs:
files-pushed:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Pushed Files
id: pushed-files
env:
ADDED_FILES: ${{ github.event.head_commit.added }}
MODIFIED_FILES: ${{ github.event.head_commit.modified }}
REMOVED_FILES: ${{ github.event.head_commit.removed }}
shell: python
run: |
import os
import subprocess
import json
NEW_FILES = os.environ['ADDED_FILES']
MODIFIED_FILES = os.environ['MODIFIED_FILES']
REMOVED_FILES = os.environ['REMOVED_FILES']
GITHUB_ENV = os.getenv('GITHUB_ENV')
COMMIT_FILES = NEW_FILES + MODIFIED_FILES + REMOVED_FILES
print(f"NEW_FILES: {NEW_FILES}")


Empty file added src/test-files.js
Empty file.

0 comments on commit baa19ab

Please sign in to comment.