Skip to content

Bump actions/cache from 4.3.0 to 5.0.1 (#6378) #50

Bump actions/cache from 4.3.0 to 5.0.1 (#6378)

Bump actions/cache from 4.3.0 to 5.0.1 (#6378) #50

name: Copilot Setup Steps
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
name: Perform
runs-on: ubuntu-24.04
# Swift containers don't work with Copilot
# container: swift:6.1-noble
permissions:
contents: read
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Get Swift version
id: swift_version
run: echo "version=$(swift --version | grep '[5-9]\.[0-9]\+\(\.[0-9]\)\?' -o | head -1)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
with:
key: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}-${{ hashFiles('Package.resolved', 'Package.swift') }}
restore-keys: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}-
path: .build
- name: Build everything
run: swift build --build-tests