Skip to content

Commit 7ab6a40

Browse files
committed
Auto update version db
1 parent 90665f8 commit 7ab6a40

File tree

3 files changed

+125
-178
lines changed

3 files changed

+125
-178
lines changed
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Setup Vcpkg
2+
description: Install a full vcpkg environment
3+
inputs:
4+
5+
vcpkgVersion:
6+
description: Enter vcpkg version tag or stable or latest
7+
required: false
8+
default: latest
9+
type: string
10+
11+
vcpkgRoot:
12+
description: Enter VCPKGROOT as vcpkg root path
13+
required: false
14+
default: /usr/local/vcpkg
15+
type: string
16+
17+
vcpkgDownload:
18+
description: Enter VCPKGDOWNLOAD as vcpkg download path
19+
required: false
20+
default: /usr/local/vcpkg-downloads
21+
type: string
22+
23+
runs:
24+
using: composite
25+
steps:
26+
- name: Setup vcpkg
27+
run: |
28+
git clone --depth 1 https://github.com/msclock/features.git /tmp/vcpkg
29+
30+
sudo USERNAME="$USER" VCPKGVERSION="${{ inputs.vcpkgVersion }}" VCPKGROOT="${{ inputs.vcpkgRoot }}" \
31+
VCPKGDOWNLOAD="${{ inputs.vcpkgDownload }}" /tmp/vcpkg/src/vcpkg/install.sh
32+
vcpkg --version
33+
shell: bash

.github/workflows/untrustedPR.yml

-178
This file was deleted.

.github/workflows/versions.yml

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- qca-qt5
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
format_and_update_ports:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
ref: ${{ github.head_ref }}
24+
fetch-depth: 2
25+
26+
- name: Setup vcpkg
27+
uses: ./.github/actions/setup-vcpkg
28+
with:
29+
vcpkgVersion: latest
30+
vcpkgRoot: /usr/local/vcpkg
31+
vcpkgDownload: /usr/local/vcpkg-downloads
32+
33+
- name: Format vcpkg.json
34+
run: |
35+
vcpkg format-manifest --all $(find . -name "vcpkg.json")
36+
37+
- name: Commit format vcpkg.json
38+
uses: stefanzweifel/git-auto-commit-action@v5
39+
if: success()
40+
with:
41+
commit_message: 'ci: format vcpkg configuration'
42+
file_pattern: vcpkg.json
43+
44+
- name: Exit 1 if vcpkg configuration changes have been detected
45+
if: steps.auto-commit-action.outputs.changes_detected == 'true'
46+
run: |
47+
exit 1
48+
49+
- name: Detect ports changes against default branch
50+
id: filter-ports
51+
uses: dorny/paths-filter@v2
52+
with:
53+
list-files: shell
54+
filters: |
55+
ports:
56+
- ports/**
57+
58+
- name: Update versions
59+
if: steps.filter-ports.outputs.ports == 'true'
60+
run: |
61+
for dir in ports/* ; do
62+
vcpkg x-add-version ${dir##ports/} --overlay-ports=./ports \
63+
--x-builtin-registry-versions-dir=./versions/ \
64+
--x-builtin-ports-root=./ports
65+
done
66+
67+
- name: Detect versions changes against local
68+
if: steps.filter-ports.outputs.ports == 'true'
69+
id: filter-versions
70+
uses: dorny/paths-filter@v2
71+
with:
72+
list-files: shell
73+
base: HEAD
74+
filters: |
75+
versions:
76+
- versions/**
77+
78+
- name: Get last commit message
79+
if: steps.filter-versions.outputs.versions == 'true'
80+
id: last-commit-message
81+
run: |
82+
echo "msg=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
83+
84+
- name: Commit versions
85+
if: steps.filter-versions.outputs.versions == 'true'
86+
uses: stefanzweifel/git-auto-commit-action@v5
87+
with:
88+
file_pattern: versions/*
89+
commit_message: ${{ steps.last-commit-message.outputs.msg }}
90+
push_options: --force
91+
commit_options: --amend --no-edit
92+
skip_fetch: true

0 commit comments

Comments
 (0)