Skip to content

Commit e7c7102

Browse files
authored
Merge pull request #33 from sjinks/update-vcpkg-config
chore: update vcpkg configuration
2 parents f64efd9 + 5903197 commit e7c7102

File tree

4 files changed

+57
-3
lines changed

4 files changed

+57
-3
lines changed

.github/workflows/ci-vcpkg.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4040
with:
4141
submodules: true
42+
fetch-depth: 0
4243

4344
- name: Set up cmake and ninja
4445
uses: lukka/get-cmake@acb35cf920333f4dc3fc4f424f1b30d5e7d561b4 # v3.31.4

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6363
with:
6464
submodules: true
65+
fetch-depth: 0
6566

6667
- name: Install dependencies
6768
uses: ./.github/actions/install-dependencies
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Update vcpkg baseline
2+
3+
on:
4+
push:
5+
paths:
6+
- 'vcpkg/**'
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
update-baseline:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
steps:
19+
- name: Harden Runner
20+
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
21+
with:
22+
egress-policy: audit
23+
24+
- name: Check out code
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
with:
27+
submodules: true
28+
29+
- name: Get latest vcpkg baseline
30+
id: vcpkg-baseline
31+
run: |
32+
BASELINE="$(git submodule status vcpkg | awk '{print $1}')"
33+
echo "baseline=${BASELINE}" >> ${GITHUB_OUTPUT}
34+
35+
- name: Update vcpkg-configuration.json
36+
run: |
37+
jq --arg baseline "${{ steps.vcpkg-baseline.outputs.baseline }}" '.["default-registry"].baseline = $baseline' vcpkg-configuration.json > tmp.$$.json && mv tmp.$$.json vcpkg-configuration.json
38+
if ! git diff --quiet vcpkg-configuration.json; then
39+
echo "KEEP_GOING=yes" >> "${GITHUB_ENV}"
40+
fi
41+
42+
- name: Create Pull Request
43+
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
44+
with:
45+
commit-message: "chore(deps): update default registry's baseline to `${{ steps.vcpkg-baseline.outputs.baseline }}`"
46+
title: "chore(deps): update default registry's baseline to `${{ steps.vcpkg-baseline.outputs.baseline }}`"
47+
body: |
48+
This PR updates default registry's baseline to `${{ steps.vcpkg-baseline.outputs.baseline }}`.
49+
branch: "update-vcpkg-baseline-${{ steps.vcpkg-baseline.outputs.baseline }}"
50+
labels: dependencies
51+
token: ${{ secrets.REPOSITORY_ACCESS_TOKEN }}
52+
if: env.KEEP_GOING == 'yes'

vcpkg-configuration.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2+
"$schema": "https://github.com/microsoft/vcpkg-tool/raw/refs/heads/main/docs/vcpkg-configuration.schema.json",
23
"default-registry": {
3-
"kind": "git",
4-
"baseline": "b322364f06308bdd24823f9d8f03fe0cc86fd46f",
5-
"repository": "https://github.com/microsoft/vcpkg"
4+
"kind": "builtin",
5+
"baseline": "b322364f06308bdd24823f9d8f03fe0cc86fd46f"
66
},
77
"registries": [
88
{

0 commit comments

Comments
 (0)