Create 1441_Build_an_Array_With_Stack_Operations.java #154
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Header | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Get changed files | |
id: changed-files-specific | |
uses: tj-actions/changed-files@v35 | |
with: | |
since_last_remote_commit: true | |
files: | | |
*.java | |
# !*.md | |
# test_directory | |
# **/*.sql | |
- name: Setting up the git user | |
run: | | |
git config --global user.name 'Muhammad Khuzaima Umair' | |
git config --global user.email 'mkhuzaima@users.noreply.github.com' | |
- name: Run for changed java files | |
run: | | |
for file in ${{ steps.changed-files-specific.outputs.all_changed_files }}; do | |
echo "$file was changed" | |
python .github/workflows/updateHeader.py $file | |
# create commit | |
git commit -am "Formatted $file" || echo "nothing to commit" | |
done | |
git push || echo "There is nothing to push" | |
# - name: Run step if only the files listed above change | |
# if: steps.changed-files-specific.outputs.only_changed == 'true' | |
# run: | | |
# echo "Only files listed above have changed." | |
# - name: Run step if any of the listed files above is deleted | |
# if: steps.changed-files-specific.outputs.any_deleted == 'true' | |
# run: | | |
# for file in ${{ steps.changed-files-specific.outputs.deleted_files }}; do | |
# echo "$file was deleted" | |
# done | |
# - name: Run step if all listed files above have been deleted | |
# if: steps.changed-files-specific.outputs.only_deleted == 'true' | |
# run: | | |
# for file in ${{ steps.changed-files-specific.outputs.deleted_files }}; do | |
# echo "$file was deleted" | |
# done |