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 IP Ranges | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
schedule: | |
- cron: '53 */3 * * *' | |
jobs: | |
googlebot: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Run Googlebot Script | |
run: | | |
chmod +x ./googlebot/start.sh | |
./googlebot/start.sh | |
- name: Extract Timestamp from File (Googlebot) | |
id: googlebot-extract-timestamp | |
run: echo "googlebot_utc=$(<./googlebot/timestamp.txt)" >> "$GITHUB_OUTPUT" | |
- name: Git Auto Commit (Googlebot) | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: '[BOT] [Googlebot] changes - ${{ steps.googlebot-extract-timestamp.outputs.googlebot_utc }}' | |
push_options: '--force' | |
oci: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Run OCI Script | |
run: | | |
chmod +x ./oracle/start.sh | |
./oracle/start.sh | |
- name: Extract Timestamp from File (OCI) | |
id: oracle-extract-timestamp | |
run: echo "oracle_utc=$(<./oracle/timestamp.txt)" >> "$GITHUB_OUTPUT" | |
- name: Git Auto Commit (OCI) | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: '[BOT] [OCI] changes - ${{ steps.oracle-extract-timestamp.outputs.oracle_utc }}' | |
push_options: '--force' | |
azure: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Run Azure Script | |
run: | | |
chmod +x ./microsoft-azure/start.sh | |
./microsoft-azure/start.sh | |
- name: Extract Timestamp from File (Azure) | |
id: azure-extract-timestamp | |
run: echo "azure_utc=$(<./microsoft-azure/timestamp.txt)" >> "$GITHUB_OUTPUT" | |
- name: Git Auto Commit (Azure) | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: '[BOT] [Azure] changes - ${{ steps.azure-extract-timestamp.outputs.azure_utc }}' | |
push_options: '--force' | |
github: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Run Github Script | |
run: | | |
chmod +x ./github/start.sh | |
./github/start.sh | |
- name: Extract Timestamp from File (Github) | |
id: github-extract-timestamp | |
run: echo "github_utc=$(<./github/timestamp.txt)" >> "$GITHUB_OUTPUT" | |
- name: Git Auto Commit (Github) | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: '[BOT] [Github] changes - ${{ steps.github-extract-timestamp.outputs.github_utc }}' | |
push_options: '--force' | |
cloudflare: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Run Cloudflare Script | |
run: | | |
chmod +x ./cloudflare/start.sh | |
./cloudflare/start.sh | |
- name: Extract Timestamp from File (Cloudflare) | |
id: cloudflare-extract-timestamp | |
run: echo "cloudflare_utc=$(<./cloudflare/timestamp.txt)" >> "$GITHUB_OUTPUT" | |
- name: Git Auto Commit (Cloudflare) | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: '[BOT] [Cloudflare] changes - ${{ steps.cloudflare-extract-timestamp.outputs.cloudflare_utc }}' | |
push_options: '--force' | |
aws: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Run AWS Script | |
run: | | |
chmod +x ./amazon/start.sh | |
./amazon/start.sh | |
- name: Extract Timestamp from File (AWS) | |
id: amazon-extract-timestamp | |
run: echo "amazon_utc=$(<./amazon/timestamp.txt)" >> "$GITHUB_OUTPUT" | |
- name: Git Auto Commit (AWS) | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: '[BOT] [AWS] changes - ${{ steps.amazon-extract-timestamp.outputs.amazon_utc }}' | |
push_options: '--force' | |
bing: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Run Bing Script | |
run: | | |
chmod +x ./bingbot/start.sh | |
./bingbot/start.sh | |
- name: Extract Timestamp from File (Bing) | |
id: bingbot-extract-timestamp | |
run: echo "bingbot_utc=$(<./bingbot/timestamp.txt)" >> "$GITHUB_OUTPUT" | |
- name: Git Auto Commit (Bing) | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: '[BOT] [Bing] changes - ${{ steps.bingbot-extract-timestamp.outputs.bingbot_utc }}' | |
push_options: '--force' | |
mini: | |
runs-on: ubuntu-latest | |
needs: [googlebot, oci, azure, github, cloudflare, aws, bing] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
with: | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install | |
- name: build | |
run: pnpm build | |
- name: set env | |
run: echo "NOW=$(TZ=Asia/Seoul date +'%Y.%m.%d')" >> $GITHUB_ENV | |
- name: Mini Commit And Push | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: '[BOT] [MINI] changes - ${{ env.NOW }}' | |
push_options: '--force' |