Skip to content

Commit

Permalink
Merge pull request #6 from devsapp/fix/invoke
Browse files Browse the repository at this point in the history
fix:invoke return
  • Loading branch information
rsonghuster authored Nov 6, 2024
2 parents f1e3eae + c7676ed commit 9da6e62
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/registry-publish.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: publish package to registry

on:
release:
types: [created]
push:
branches:
- V3

jobs:
deploy:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git config --global core.symlinks false
shell: bash
- uses: actions/checkout@v4
- uses: actions/setup-node@v2
with:
node-version: 16
Expand All @@ -25,4 +28,4 @@ jobs:
s registry login --token ${{ secrets.alibaba_registry_v3_publish_token }}
- name: release prod
run: |
s registry publish
s registry publish
2 changes: 1 addition & 1 deletion publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Type: Project
Name: start-pdf-watermark-v3
Provider:
- 阿里云
Version: 0.0.5
Version: 0.0.6
Description: 本案例将 PDF Watermark,这一方便且实用的工具,快速创建并部署到阿里云函数计算 FC。
HomePage: https://github.com/devsapp/start-pdf-watermark
Organization: 阿里云函数计算(FC)
Expand Down
6 changes: 4 additions & 2 deletions src/code/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ def handler(event, context):
subprocess.check_call(["ls", "-ll", "/tmp"])
subprocess.check_call("rm -rf /tmp/*", shell=True)
if result.status == 200:
return "upload to oss success!"
print("upload to oss success!")
return {"code": "Success"}
else:
return "upload fail, error code %s " % result.status
print("upload fail, error code %s " % result.status)
return {"code": "Failed"}

0 comments on commit 9da6e62

Please sign in to comment.