-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1.32 KB
/
fetch-contents.yml
File metadata and controls
39 lines (35 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Fetch contents from Hacktricks repos
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *' # every day at 2:00 AM UTC
jobs:
fetch-contents:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch hacktricks src
run: |
git remote add hacktricks https://github.com/HackTricks-wiki/hacktricks.git
git fetch hacktricks master
git checkout -B hacktricks-master hacktricks/master
# remove .github/ to avoid workflow conflicts
rm -rf .github/
git config user.name "github-actions"
git config user.email "actions@github.com"
git commit -am "Remove upstream .github directory"
git push --force origin hacktricks-master
- name: Fetch hacktricks-cloud src
run: |
git remote add hacktricks-cloud https://github.com/HackTricks-wiki/hacktricks-cloud.git
git fetch hacktricks-cloud master
git checkout -B hacktricks-cloud-master hacktricks-cloud/master
# remove .github/ to avoid workflow conflicts
rm -rf .github/
git config user.name "github-actions"
git config user.email "actions@github.com"
git commit -am "Remove upstream .github directory"
git push --force origin hacktricks-cloud-master