Skip to content

Commit 49913bf

Browse files
committed
Automated deployment: Tue Sep 24 10:32:45 UTC 2019 6130af4
0 parents  commit 49913bf

27 files changed

+1543
-0
lines changed

.github/workflows/ci.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
- '!latest'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Pull sources
15+
uses: actions/checkout@v1
16+
17+
- name: Configure Node
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: '10.x'
21+
22+
- name: Install dependencies
23+
run: npm install
24+
25+
- name: Publish
26+
if: github.event.ref == 'refs/heads/master'
27+
run: |
28+
remote_branch=latest
29+
git checkout --orphan "$remote_branch"
30+
git config user.name "$GITHUB_ACTOR"
31+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
32+
git remote rm origin || true
33+
34+
remote_repo="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
35+
git remote add origin "$remote_repo"
36+
37+
git add --all
38+
COMMIT_MESSAGE="Automated deployment: $(date -u) $GITHUB_SHA"
39+
git commit -m "$COMMIT_MESSAGE" | true
40+
git push origin "$remote_branch" --force
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

LICENSE

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Boost Software License - Version 1.0 - August 17th, 2003
2+
3+
Permission is hereby granted, free of charge, to any person or organization
4+
obtaining a copy of the software and accompanying documentation covered by
5+
this license (the "Software") to use, reproduce, display, distribute,
6+
execute, and transmit the Software, and to prepare derivative works of the
7+
Software, and to permit third-parties to whom the Software is furnished to
8+
do so, all subject to the following:
9+
10+
The copyright notices in the Software and this entire statement, including
11+
the above license grant, this restriction and the following disclaimer,
12+
must be included in all copies of the Software, in whole or in part, and
13+
all derivative works of the Software, unless such copies or derivative
14+
works are solely in the form of machine-executable object code generated by
15+
a source language processor.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
20+
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
21+
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
22+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23+
DEALINGS IN THE SOFTWARE.

README.adoc

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
= run-cpt
2+
:toc: preamble
3+
4+
[link=https://github.com/grisumbras/run-cpt/actions]
5+
image::https://github.com/grisumbras/run-cpt/workflows/ci/badge.svg[Build status]
6+
7+
____
8+
GitHub Action that runs conan_package_tools
9+
____
10+
11+
12+
== Usage
13+
14+
Example usage:
15+
16+
[source,yaml]
17+
----
18+
uses: grisumbras/run-cpt@latest
19+
with:
20+
build-script: conan/build.py
21+
----
22+
23+
You can set environment variables that control Conan and CPT behaviour using
24+
`env` key:
25+
26+
[source,yaml]
27+
----
28+
- uses: grisumbras/run-cpt@latest
29+
env:
30+
CONAN_REMOTES: https://api.bintray.com/conan/bincrafters/public-conan
31+
----
32+
33+
Additionally, if `CONAN_USERNAME` is not specified, the first part of
34+
`GITHUB_REPOSITORY` (before slash) will be used.
35+
36+
37+
== Inputs
38+
39+
=== `build-script`
40+
41+
Path to the build script. Given `build-script: x/y/z.py`, the action will run
42+
`python x/y/z.py`.
43+
44+
45+
== Maintainer
46+
Dmitry Arkhipov <[email protected]>
47+
48+
49+
== Contributing
50+
Patches welcome!
51+
52+
53+
== License
54+
link:LICENSE[BSL-1.0] (C) 2019 Dmitry Arkhipov

action.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: run-cpt
2+
author: Dmitry Arkhipov <[email protected]>
3+
description: Runs conan_package_tools
4+
branding:
5+
icon: package
6+
color: blue
7+
inputs:
8+
build-script:
9+
description: Path to the build script
10+
required: false
11+
default: build.py
12+
runs:
13+
using: node12
14+
main: main.js

main.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
const core = require('@actions/core');
2+
const exec = require('@actions/exec');
3+
4+
5+
function get_username() {
6+
const repo = process.env['GITHUB_REPOSITORY'] || '';
7+
return (repo.split('/', 1) || [''])[0];
8+
};
9+
10+
11+
async function run() {
12+
try {
13+
console.log('Installing conan_package_tools...')
14+
await exec.exec('pip', ['install', 'conan_package_tools']);
15+
16+
const conan_username = process.env['CONAN_USERNAME'] || get_username();
17+
const opts
18+
= { env: Object.assign({CONAN_USERNAME: conan_username}, process.env)
19+
};
20+
21+
console.log('Running conan_package_tools...')
22+
await exec.exec('python', [core.getInput('build-script')], opts);
23+
} catch (error) {
24+
core.setFailed(error.message);
25+
}
26+
}
27+
28+
run()

node_modules/@actions/core/README.md

+97
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/core/lib/command.d.ts

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/core/lib/command.js

+66
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/core/lib/command.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)