2022-11-16 15:02:01 +00:00
|
|
|
name: "Generate Arch Mirror List"
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * *"
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
generate_arch_mirrors:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Generate Arch Mirror List
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Generate Arch Mirror List
|
|
|
|
id: generate
|
2022-12-06 19:58:08 +08:00
|
|
|
run: curl -L https://www.archlinux.org/mirrorlist/all/http | grep -oP 'https?://\K[^/]*' | sed "s/:.*//g" | sort -u >arch.txt
|
2022-11-16 15:02:01 +00:00
|
|
|
|
|
|
|
- name: Get current date
|
|
|
|
id: date
|
|
|
|
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
|
|
|
|
|
|
|
|
- name: Push to master branch
|
|
|
|
uses: Automattic/action-commit-to-branch@master
|
|
|
|
with:
|
|
|
|
branch: "master"
|
|
|
|
commit_message: "GitHub Actions build: ${{ steps.date.outputs.date }}"
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|