Skip to content

Commit

Permalink
Merge pull request #1015 from ItsIgnacioPortal/GithubActions
Browse files Browse the repository at this point in the history
fix(CICD): Corrected multiple issues in GitHub Actions workflows
  • Loading branch information
g0tmi1k authored Jun 13, 2024
2 parents 51a23f3 + 9553657 commit e624daa
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 35 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/readme-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:

update-readme:
runs-on: ubuntu-latest
permissions:
contents: write
steps:

- name: Clone repository
Expand All @@ -28,8 +30,8 @@ jobs:
echo "[+] Files were changed! Pushing changed..."
git add -A
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git config --local user.email "example@github.com"
git config --local user.name "GitHub Action"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "[Github Action] Automated readme update."
git push
fi
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/remote-wordlists-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:

jobs:
update-files:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -25,8 +27,8 @@ jobs:
echo "[+] Files were changed! Pushing changed..."
git add --renormalize -A && git add -A
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git config --local user.email "example@github.com"
git config --local user.name "GitHub Action"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "[Github Action] Automated trickest wordlists update."
git push
fi
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:

- name: Configure git email and username
run: |
git config --local user.email "example@github.com"
git config --local user.name "GitHub Action"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Check git status and save to output
id: myoutputs
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/wordlist-updater_combined_directories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@ name: Wordlist Updater - directories
on:
push:
paths:
- 'Discovery/Web-Content/raft-small-directories.txt'
- 'Discovery/Web-Content/raft-small-directories-lowercase.txt'
- 'Discovery/Web-Content/directory-list-2.3-small.txt'
- 'Discovery/Web-Content/raft-medium-directories-lowercase.txt'
- 'Discovery/Web-Content/raft-medium-directories.txt'
- 'Discovery/Web-Content/directory-list-2.3-medium.txt'
- 'Discovery/Web-Content/apache.txt '
- 'Discovery/Web-Content/directory-list-2.3-big.txt'
- 'Discovery/Web-Content/raft-large-directories-lowercase.txt'
- 'Discovery/Web-Content/raft-large-directories.txt '
- 'Discovery/Web-Content/directory-list-1.0.txt'
- 'Discovery/Web-Content/combined_words.txt'
- 'Discovery/Web-Content/raft-small-directories.txt'
- 'Discovery/Web-Content/raft-small-directories-lowercase.txt'
- 'Discovery/Web-Content/directory-list-2.3-small.txt'
- 'Discovery/Web-Content/raft-medium-directories-lowercase.txt'
- 'Discovery/Web-Content/raft-medium-directories.txt'
- 'Discovery/Web-Content/directory-list-2.3-medium.txt'
- 'Discovery/Web-Content/apache.txt'
- 'Discovery/Web-Content/directory-list-2.3-big.txt'
- 'Discovery/Web-Content/raft-large-directories-lowercase.txt'
- 'Discovery/Web-Content/raft-large-directories.txt'
- 'Discovery/Web-Content/directory-list-1.0.txt'
- 'Discovery/Web-Content/combined_words.txt'

jobs:
update_combined_words:
update_combined_directories:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate combined_directories.txt
run: cd Discovery/Web-Content/ && cat raft-small-directories* directory-list-2.3-small.txt raft-medium-directories* directory-list-2.3-medium.txt apache.txt combined_words.txt directory-list-2.3-big.txt raft-large-directories* directory-list-1.0.txt | awk '! seen[$0]++' > combined_directories.txt
- name: Switching from HTTPS to SSH
run: git remote set-url origin git@github.com:danielmiessler/SecLists.git
run: git remote set-url origin git@github.com:${{ GITHUB_REPOSITORY }}.git
- name: Check for changes
run: git status
- name: Stage changed files
run: git add Discovery/Web-Content/combined_directories.txt
- name: Configure git email and username
run: |
git config --local user.email "example@github.com"
git config --local user.name "GitHub Action"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Commit changed files
run: git commit -m "[Github Action] Updated combined_directories.txt"
- name: Push changes # push the output folder to your repo
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/wordlist-updater_combined_words.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: Wordlist Updater - words
on:
push:
paths:
- 'Discovery/Web-Content/common.txt'
- 'Discovery/Web-Content/raft-small-words.txt'
- 'Discovery/Web-Content/raft-small-words-lowercase.txt'
- 'Discovery/Web-Content/raft-medium-words-lowercase.txt'
- 'Discovery/Web-Content/raft-medium-words.txt'
- 'Discovery/Web-Content/big.txt'
- 'Discovery/Web-Content/raft-large-words-lowercase.txt'
- 'Discovery/Web-Content/raft-large-words.txt'
- 'Discovery/Web-Content/common.txt'
- 'Discovery/Web-Content/raft-small-words.txt'
- 'Discovery/Web-Content/raft-small-words-lowercase.txt'
- 'Discovery/Web-Content/raft-medium-words-lowercase.txt'
- 'Discovery/Web-Content/raft-medium-words.txt'
- 'Discovery/Web-Content/big.txt'
- 'Discovery/Web-Content/raft-large-words-lowercase.txt'
- 'Discovery/Web-Content/raft-large-words.txt'

jobs:
update_combined_words:
Expand All @@ -20,15 +20,15 @@ jobs:
- name: Generate combined_words.txt
run: cd Discovery/Web-Content/ && cat common.txt raft-small-words* raft-medium-words* big.txt raft-large-words* | awk '! seen[$0]++' > combined_words.txt
- name: Switching from HTTPS to SSH
run: git remote set-url origin git@github.com:danielmiessler/SecLists.git
run: git remote set-url origin git@github.com:${{ GITHUB_REPOSITORY }}.git
- name: Check for changes
run: git status
- name: Stage changed files
run: git add Discovery/Web-Content/combined_words.txt
- name: Configure git email and username
run: |
git config --local user.email "example@github.com"
git config --local user.name "GitHub Action"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Commit changed files
run: git commit -m "[Github Action] Updated combined_words.txt"
- name: Push changes # push the output folder to your repo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wordlist-updater_fuzzing_etc_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:

- name: Configure git email and username
run: |
git config --local user.email "example@github.com"
git config --local user.name "GitHub Action"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Check git status and save to output
id: myoutputs
Expand Down

0 comments on commit e624daa

Please sign in to comment.