|
1 | | -name: Run SSH command |
2 | | - |
| 1 | +name: Sync to lib_smsmms |
3 | 2 | on: |
4 | | - workflow_dispatch: |
5 | | - pull_request: |
6 | | - types: |
7 | | - - closed |
8 | 3 | issues: |
9 | 4 | types: [labeled] |
10 | 5 |
|
11 | 6 | jobs: |
12 | | - build: |
| 7 | + sync_issue: |
| 8 | + if: github.event.label.name == 'libsmsmms' |
13 | 9 | runs-on: ubuntu-latest |
14 | | - environment: production |
15 | 10 | steps: |
16 | | - - name: Run SSH command |
17 | | - uses: appleboy/ssh-action@master |
18 | | - timeout-minutes: 60 |
| 11 | + - name: Create issue in lib_smsmms_android |
| 12 | + uses: actions-ecosystem/action-create-issue@v1 |
19 | 13 | with: |
20 | | - command_timeout: "60m" |
21 | | - host: ${{ secrets.HOST }} |
22 | | - username: ${{ secrets.USERNAME }} |
23 | | - password: ${{ secrets.PASSWORD }} |
24 | | - port: ${{ secrets.PORT }} |
25 | | - script: | |
26 | | - bash -s << 'EOF' |
27 | | - echo "Event: ${{ github.event_name }}" |
28 | | -
|
29 | | - # Handle merged pull requests |
30 | | - if [[ "${{ github.event_name }}" == "pull_request" ]]; then |
31 | | - if [[ "${{ github.event.pull_request.merged }}" == "true" ]]; then |
32 | | - if [[ "${{ github.event.pull_request.base.ref }}" == "staging" ]]; then |
33 | | - cd /root/digitalocean_ci_cd_app_releases && ./start.sh |
34 | | - elif [[ "${{ github.event.pull_request.base.ref }}" == "master" ]]; then |
35 | | - cd /root/digitalocean_ci_cd_app_releases && ./start.sh cp && ./start.sh build |
36 | | - fi |
37 | | - else |
38 | | - echo "PR closed but not merged. Skipping." |
39 | | - exit 0 |
40 | | - fi |
41 | | - fi |
| 14 | + github_token: ${{ secrets.SYNC_TOKEN }} |
| 15 | + repo: smswithoutborders/lib_smsmms_android |
| 16 | + title: ${{ github.event.issue.title }} |
| 17 | + body: | |
| 18 | + ${{ github.event.issue.body }} |
42 | 19 |
|
43 | | - # Handle label events |
44 | | - if [[ "${{ github.event_name }}" == "issues" ]]; then |
45 | | - echo "Label event detected. Running issues command." |
46 | | - cd /home/sherlock/issues_migrate/ |
47 | | - ./run.sh |
48 | | - fi |
49 | | - EOF |
| 20 | + --- |
| 21 | + **Source:** ${{ github.event.issue.html_url }} |
0 commit comments