Created
June 6, 2023 11:46
-
-
Save emsifa/29233db2145e526769eea33988fb4d42 to your computer and use it in GitHub Desktop.
Github Action upload zip file to webhook
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: Deploy on Tag | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Bundle repository | |
run: zip -r bundle.zip . | |
- name: HTTP Request to webhook | |
uses: wei/curl@v1 | |
with: | |
args: -X POST -F "file=@bundle.zip" -F "tag=${{ github.ref }}" -F "key=${{ env.DEPLOY_KEY }}" "https://yoursite.com/webhook" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment