-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 902 Bytes
/
update-php-sdk.yml
File metadata and controls
36 lines (29 loc) · 902 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Update php-sdk SDK
on:
# Çàïóñêàòèñÿ ðàç íà òèæäåíü (ó íåä³ëþ î 00:00 çà UTC)
schedule:
- cron: '0 0 * * 0'
# Äîäàòêîâî, ùîá ìàòè ìîæëèâ³ñòü çàïóñòèòè âðó÷íó
workflow_dispatch:
permissions:
contents: write
jobs:
update_csharp_sdk:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download csharp.tgz
run: |
curl -L -o php.tgz https://app.api2cart.com/sdk/openapi/php.tgz
# Ðîçïàêîâóºìî, âèäàëÿþ÷è 1 ð³âåíü (ïàïêó csharp)
- name: Extract php.tgz
run: |
tar -xzf php.tgz --strip-components=1
- name: Commit changes
run: |
git config user.name "GitHub Action"
git config user.email "action@github.com"
git add .
git diff-index --quiet HEAD || git commit -m "Update php SDK [skip ci]"
git push