Merge pull request #37 from rulanugrh/main #80
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: github action shell | |
on: [pull_request, push] | |
jobs: | |
test-shell-scripting: | |
runs-on: ubuntu-latest | |
steps: | |
- name: cek kode repositori | |
uses: actions/checkout@v2 | |
- run: echo "selamat datang di bellshade shell scripting" | |
- run: echo "jalan pada ${{ runner.os }}" | |
- name: list dari direktori shell scripting | |
run: | | |
d=$(date "+%Y-%m-%d") | |
file="/tmp/test.txt.$$" && touch --date "$d" "$file" | |
echo $file && find . -type d \( -path ./playground -o -path ./simple_project -o -path ./basic -o -path ./advance/03_user_administration -o -path ./advance/01_advance_file -o -path ./usefull_command \) -prune -o -iname "*.sh" -type f -newer $file > output.txt | |
for i in $(cat output.txt); do if [ -d "$i" ]; then echo "$i adalah folder."; elif [ -f "$i" ]; then chmod +x "$i" && bash "$i"; else echo "$i tidak ditemukan atau bukan file/folder."; fi; done | |
- run: echo "status ${{ job.status }}" |