Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Conditionally save fit files into GH action output #532

Merged
merged 3 commits into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/sync_peloton_to_garmin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
workoutsToDownload:
type: number
default: "5"
saveLocalCopy:
type: boolean
default: false
schedule:
- cron: '0 1 * * *'

Expand All @@ -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 }}
Expand All @@ -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"
Expand Down Expand Up @@ -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