Skip to content

Bump actions/checkout from 3.5.3 to 4.0.0 (#774) #509

Bump actions/checkout from 3.5.3 to 4.0.0 (#774)

Bump actions/checkout from 3.5.3 to 4.0.0 (#774) #509

Workflow file for this run

name: Worker
on:
push:
branches:
- main
- dev
env:
WRANGLER_VERSION: "3.5.1"
NODE_VERSION: "16.14.0"
jobs:
publish:
runs-on: ubuntu-latest
name: Publish
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install packages
run: script/bootstrap
- name: Set environment
id: environment
run: |
branch=$(echo "${{ github.ref }}" | awk -F"/" '{print $NF}' )
environment="dev"
if [[ "${branch}" == "main" ]]; then
environment="production"
fi
echo "environment=${environment}" >> "$GITHUB_OUTPUT"
- name: Publish ${{ steps.environment.outputs.environment }} worker
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CF_WORKER_API_TOKEN }}
workingDirectory: "worker"
wranglerVersion: ${{ env.WRANGLER_VERSION }}
command: deploy --env=${{ steps.environment.outputs.environment }}