upload test #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Step 0, Welcome | |
# This step triggers after the learner creates a new repository from the template. | |
# This workflow updates from step 0 to step 1. | |
# This will run every time we create push a commit to `main`. | |
# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication | |
permissions: | |
# Need `contents: read` to checkout the repository. | |
# Need `contents: write` to update the step metadata. | |
contents: write | |
jobs: | |
# Get the current step to only run the main job when the learner is on the same step. | |
cacheAndUploadTest: | |
name: Test Cache & Upload | |
runs-on: windows-latest | |
steps: | |
- name: Check GitHub Cache | |
uses: actions/cache/restore@8addae5ffffa871c88fbd2d8a9a43af45f069161 | |
id: check_cache | |
with: | |
key: "foo" | |
path: . | |
lookup-only: true | |
- name: Debug Cache | |
shell: pwsh | |
run: | | |
Get-ChildItem | Format-List | |
echo "cache hit: ${{ steps.check_cache.outputs.cache-hit }}" | |
echo "All outputs: ${{ toJson(steps.check_cache.outputs) }}" | |
- name: Debug Cache Conditional | |
if: ${{ steps.check_swiftwinrt_cache.outputs.cache-hit == false }} | |
shell: pwsh | |
run: | | |
echo "cache hit is false" | |
- name: Upload test | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: FooArtifact | |
path: C:\Program Files\PowerShell\7\pwsh.EXE | |
retention-days: 5 |