erisu commented on a change in pull request #272:
URL: https://github.com/apache/cordova-coho/pull/272#discussion_r475344627



##########
File path: .github/workflows/nightly.yml
##########
@@ -0,0 +1,109 @@
+name: Cordova Nightly
+
+on:
+  workflow_dispatch:
+    inputs:
+      dispatchReason:
+        description: 'Reason of Manual Dispatch'
+        required: true
+        default: 'Re-run broken nightly build'
+
+      verbose:
+        description: 'Enable Verbose'
+        required: true
+        default: 'false'
+
+  schedule:
+    - cron: '0 0 * * *'
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+
+    env:
+      NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+
+    steps:
+      - uses: actions/checkout@v2
+
+      - uses: actions/[email protected]
+        with:
+          node-version: 14.x
+          registry-url: 'https://registry.npmjs.org'
+
+      - name: Dispatch Inputs
+        run: |
+          echo "Dispatch Reason: ${{ github.event.inputs.dispatchReason }}"
+          echo "Enable Verbose: ${{ github.event.inputs.verbose }}"
+
+      - name: Cordova Coho - Setup
+        run: |
+          npm i
+          npm link
+
+      - name: Cordova Coho - Create Nightlies
+        run: |
+          cd ..
+          coho nightly \
+            -r cli \
+            -r lib \
+            -r common \
+            -r fetch \
+            -r serve \
+            -r create \
+            -r node-xcode \
+            -r android \
+            -r electron \
+            -r ios \
+            --pretend \
+            --verbose ${{ github.event.inputs.verbose == 'true' }}
+
+      - name: NPM Publish - cordova-cli
+        run: |
+          cd ../cordova-cli
+          npm publish --tag nightly

Review comment:
       No, the working directory for each run always starts at the default 
`working_directory`. Since we do not change the default, it will always be the 
projects cloned repo.
   
   Example Actions Run:
   
https://github.com/erisu/github-workflow-cron-test/runs/1020033012?check_suite_focus=true
   
   From the raw logs, you will see:
   
   ```
   2020-08-24T04:57:22.1609723Z Working directory is 
'/home/runner/work/github-workflow-cron-test/github-workflow-cron-test'
   ```
   
   If you continue reading, you will see the `pwd` & `npm publish` `echo` lines 
that I added just for this demo to show you.
   
   ```
   2020-08-24T04:57:25.5010854Z 
/home/runner/work/github-workflow-cron-test/cordova-cli
   2020-08-24T04:57:25.5011915Z npm publish --tag nightly
   
   2020-08-24T04:57:25.5120030Z 
/home/runner/work/github-workflow-cron-test/cordova-lib
   2020-08-24T04:57:25.5120773Z npm publish --tag nightly
   
   2020-08-24T04:57:25.5231148Z 
/home/runner/work/github-workflow-cron-test/cordova-common
   2020-08-24T04:57:25.5233846Z npm publish --tag nightly
   
   2020-08-24T04:57:25.5485269Z 
/home/runner/work/github-workflow-cron-test/cordova-fetch
   2020-08-24T04:57:25.5486885Z npm publish --tag nightly
   
   2020-08-24T04:57:25.5595488Z 
/home/runner/work/github-workflow-cron-test/cordova-serve
   2020-08-24T04:57:25.5596181Z npm publish --tag nightly
   
   2020-08-24T04:57:25.5702382Z 
/home/runner/work/github-workflow-cron-test/cordova-create
   2020-08-24T04:57:25.5705346Z npm publish --tag nightly
   
   2020-08-24T04:57:25.5811949Z 
/home/runner/work/github-workflow-cron-test/cordova-node-xcode
   2020-08-24T04:57:25.5812490Z npm publish --tag nightly
   
   2020-08-24T04:57:25.5919615Z 
/home/runner/work/github-workflow-cron-test/cordova-android
   2020-08-24T04:57:25.5920065Z npm publish --tag nightly
   
   2020-08-24T04:57:25.6032057Z 
/home/runner/work/github-workflow-cron-test/cordova-electron
   2020-08-24T04:57:25.6032617Z npm publish --tag nightly
   
   2020-08-24T04:57:25.6144948Z 
/home/runner/work/github-workflow-cron-test/cordova-ios
   2020-08-24T04:57:25.6145714Z npm publish --tag nightly
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to