mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-21 23:20:23 +00:00
28 lines
858 B
YAML
28 lines
858 B
YAML
name: Build and push to CloudFlare Worker
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Spellcheck
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# The checkout step
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download _worker.js
|
|
run: |
|
|
curl -o _worker.js https://raw.githubusercontent.com/cmliu/CF-Workers-docker.io/main/_worker.js
|
|
|
|
- name: Set compatibility date
|
|
id: set-date
|
|
run: echo "COMPATIBILITY_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV
|
|
|
|
- name: Deploy to cloudflare
|
|
uses: cloudflare/wrangler-action@v3
|
|
with:
|
|
apiToken: ${{ secrets.EDIT_CLOUDFLARE_WORKERS }}
|
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
command: deploy _worker.js --name dockerhub --compatibility-date ${{ env.COMPATIBILITY_DATE }}
|