-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (87 loc) · 3.05 KB
/
_update_lockfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
name: "(chunk) Update lockfile"
on:
workflow_call:
inputs:
docker_image:
type: string
required: false
default: conanio/gcc11-ubuntu16.04:1.47.0
library_name:
type: string
required: true
description: "Name of the library. It should match name of the repository"
library_version:
type: string
required: true
description: "Version of the library."
remote_center:
type: string
required: false
default: https://sogo.jfrog.io/artifactory/api/conan/conan-center
profile:
type: string
required: true
description: "Profile to use in this run"
conanfile:
type: string
required: false
default: conanfile.txt
description: "Name of the conanfile, typically it will be `conanfile.txt` or `conanfile.py`"
secrets:
APP_RECIPES_APP_ID:
required: true
APP_RECIPES_PRIVATE_KEY:
required: true
env:
CONAN_USER_HOME: /home/conan
defaults:
run:
working-directory: /home/conan/library
jobs:
build_and_test:
runs-on: ubuntu-latest
container:
image: ${{ inputs.docker_image }}
env:
CONAN_SYSREQUIRES_MODE: enabled
CONAN_PRINT_RUN_COMMANDS: 1
steps:
- name: Check out repository code
uses: rodrigorodriguescosta/checkout@1d64c0a4a695ff5edb95596c11b430050668c83f # FIXME: Not using actions/checkout just because of 'https://github.com/actions/checkout/pull/388'
with:
path: /home/conan/library
- name: Configure Conan
run: |
conan config init --force
conan config set general.revisions_enabled=1
conan profile update settings.compiler.libcxx=libstdc++11 default
conan config install https://github.com/conan-io/conanclientcert.git
conan --version
conan config home
- name: Connect to remote
run: |
conan remote add sogo ${{ inputs.remote_center }}
- name: Prepare deps
run: |
cp -r .conan/profiles /home/conan/.conan
conan profile list
- name: Update deps in lockfile
run: |
conan lock create --name=${{ inputs.library_name }} --version=${{ inputs.library_version }} --base --lockfile-out lockfile.json --build --profile:host=${{ inputs.profile }} --profile:build=default ${{ inputs.conanfile }}
git diff
- uses: tibdex/github-app-token@7ce9ffdcdeb2ba82b01b51d6584a6a85872336d4
id: generate-token
with:
app_id: ${{ secrets.APP_RECIPES_APP_ID }}
private_key: ${{ secrets.APP_RECIPES_PRIVATE_KEY }}
- name: Create pull request
uses: peter-evans/create-pull-request@dcd5fd746d53dd8de555c0f10bca6c35628be47a
with:
path: /home/conan/library
commit-message: "Update lockfile"
branch: "update-lockfile"
title: "[bot] Update lockfile"
body: "Recreated base lockfile"
reviewers: "jgsogo"
token: ${{ steps.generate-token.outputs.token }}