Skip to content

Commit

Permalink
ci(.github/workflows/worker.yml): add tag and message
Browse files Browse the repository at this point in the history
  • Loading branch information
risu729 committed Jan 11, 2025
1 parent 7c4160e commit c321afd
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,22 @@ jobs:
args=$(mise run worker:wrangler-args)
echo "args=${args}" >> "${GITHUB_OUTPUT}"
- name: Deploy to Cloudflare workers with Wrangler
- name: Get Commit SHA and Message
id: commit
run: |
sha=${{ github.event.pull_request.head.sha || github.sha }}
message=$(git log --format=%B --max-count=1 $sha)
echo "message=${message}" >> "${GITHUB_OUTPUT}"
- name: Upload a Version of Cloudflare Workers with Wrangler
id: deploy
uses: cloudflare/wrangler-action@6d58852c35a27e6034745c5d0bc373d739014f7f # v3.13.0
with:
workingDirectory: worker
command: versions upload ${{ steps.wrangler-args.outputs.args }}
command: >-
versions upload --tag ${{ steps.commit.outputs.sha }}
--message ${{ steps.commit.outputs.message }}
${{ steps.wrangler-args.outputs.args }}
apiToken: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }}
accountId: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}

Expand Down

0 comments on commit c321afd

Please sign in to comment.