diff --git a/.github/workflows/sync_peloton_to_garmin.yml b/.github/workflows/sync_peloton_to_garmin.yml index c3c70ee09..295bb48ed 100644 --- a/.github/workflows/sync_peloton_to_garmin.yml +++ b/.github/workflows/sync_peloton_to_garmin.yml @@ -9,6 +9,9 @@ on: workoutsToDownload: type: number default: "5" + saveLocalCopy: + type: boolean + default: false schedule: - cron: '0 1 * * *' @@ -19,7 +22,9 @@ jobs: container: image: philosowaffle/peloton-to-garmin:stable steps: - - run: mkdir -p /app/output + - name: Set env + run: echo "OUTPUT_DIR=/app/output" >> $GITHUB_ENV + - run: mkdir -p ${{ env.OUTPUT_DIR }} - name: Create device info file env: DEVICE_INFO: ${{ secrets.DEVICE_INFO }} @@ -43,7 +48,7 @@ jobs: "Fit": true, "Json": false, "Tcx": false, - "SaveLocalCopy": false, + "SaveLocalCopy": ${{ github.event.inputs.saveLocalCopy }}, "IncludeTimeInHRZones": false, "IncludeTimeInPowerZones": false, "DeviceInfoPath": "./deviceInfo.xml" @@ -83,3 +88,8 @@ jobs: P2G_GARMIN__EMAIL: ${{ secrets.P2G_GARMIN__EMAIL }} P2G_GARMIN__PASSWORD: ${{ secrets.P2G_GARMIN__PASSWORD }} TZ: America/Chicago + - uses: actions/upload-artifact@v3 + if: ${{ github.event.inputs.saveLocalCopy }} + with: + name: output + path: ${{ env.OUTPUT_DIR }}/fit/*.fit