@@ -105,10 +105,7 @@ jobs:
105
105
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
106
106
GITHUB_ACTOR : ${{ github.actor }}
107
107
run : |
108
- # sparse checkout the repository
109
- # because our specific requirements aren't met by the default action,
110
- # we opt for using custom checkout logic rather than actions/checkout
111
- # ------------------------------------------------------------------
108
+ # using custom checkout logic rather than actions/checkout
112
109
REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
113
110
114
111
git config --global user.name "github-actions[bot]"
@@ -124,7 +121,6 @@ jobs:
124
121
125
122
# normalize inputs
126
123
# ------------------------------------------------------------------
127
-
128
124
MAX_TIMEFRAME=60
129
125
DEFAULT_TIMEFRAME=7
130
126
VIDEO_TIMEFRAME=${DEFAULT_TIMEFRAME}
@@ -176,9 +172,7 @@ jobs:
176
172
177
173
((timeframe <= 0)) && timeframe=1
178
174
179
- # ------------------------------------------------------------------
180
175
# collect the dates and files, add them to the sparse checkout
181
- # ------------------------------------------------------------------
182
176
dates=()
183
177
files=()
184
178
for cur in "${all_dates[@]}"; do
@@ -190,11 +184,10 @@ jobs:
190
184
fi
191
185
fi
192
186
done
193
- git checkout main
187
+ git checkout
194
188
195
- # ------------------------------------------------------------------
196
189
# output the results as JSON to GitHub Actions Outputs
197
- # ------------------------------------------------------------------
190
+
198
191
all_dates_str="$(printf '%s\n' "${all_dates[@]}" | jq -R . | jq -c -s '@json')"
199
192
dates_str="$(printf '%s\n' "${dates[@]}" | jq -R . | jq -c -s '@json')"
200
193
files_str="$(printf '%s\n' "${files[@]}" | jq -R . | jq -c -s '@json')"
@@ -273,7 +266,7 @@ jobs:
273
266
files : ${{ steps.collect.outputs.files }}
274
267
dates : ${{ steps.collect.outputs.dates }}
275
268
all_dates : ${{ steps.collect.outputs.all_dates }}
276
- VIDEO_FPS : ${{ env.VIDEO_FPS || inputs.video_fps }}
269
+ VIDEO_FPS : ${{ toJson( env.VIDEO_FPS || inputs.video_fps) }}
277
270
VIDEO_CODEC : ${{ env.VIDEO_CODEC || inputs.video_codec }}
278
271
VIDEO_SIZE : ${{ env.VIDEO_SIZE || inputs.video_size }}
279
272
VIDEO_FORMAT : ${{ env.VIDEO_FORMAT || inputs.video_format }}
@@ -325,7 +318,7 @@ jobs:
325
318
-metadata description="${description:-}" \
326
319
-metadata year="$(date +%Y)" \
327
320
-metadata date="$(date +%Y-%m-%d)" \
328
- -metadata comment="Generated by github.com/nberlette/f1" \
321
+ -metadata comment="Generated by github.com/${GITHUB_REPOSITORY:- nberlette/f1} " \
329
322
"${OUTPUT_PATH:-}"
330
323
331
324
- name : Upload Artifact
@@ -400,5 +393,4 @@ jobs:
400
393
printf -v PR_TITLE '🎬 New Timelapse for %s (%d days)' "${VIDEO_START_DATE}${VIDEO_END_DATE:+" - ${VIDEO_END_DATE}"}" "${VIDEO_TIMEFRAME}"
401
394
402
395
# open the pull request using the github cli
403
- gh pr create --title "${PR_TITLE}" -b "${PR_BODY}" -l timelapse,assets,automation \
404
- -r "${GITHUB_ACTOR}" -a "${GITHUB_ACTOR}" -B main -H "${BRANCH_NAME}"
396
+ gh pr create --title "${PR_TITLE}" -b "${PR_BODY}" -l timelapse,assets,automated -r "${GITHUB_ACTOR}" -a "${GITHUB_ACTOR}" -B main -H "${BRANCH_NAME}"
0 commit comments