-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automated deployment: Tue Sep 24 10:32:45 UTC 2019 6130af4
- Loading branch information
0 parents
commit 49913bf
Showing
27 changed files
with
1,543 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
- '!latest' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Pull sources | ||
uses: actions/checkout@v1 | ||
|
||
- name: Configure Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '10.x' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Publish | ||
if: github.event.ref == 'refs/heads/master' | ||
run: | | ||
remote_branch=latest | ||
git checkout --orphan "$remote_branch" | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
git remote rm origin || true | ||
remote_repo="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | ||
git remote add origin "$remote_repo" | ||
git add --all | ||
COMMIT_MESSAGE="Automated deployment: $(date -u) $GITHUB_SHA" | ||
git commit -m "$COMMIT_MESSAGE" | true | ||
git push origin "$remote_branch" --force | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Boost Software License - Version 1.0 - August 17th, 2003 | ||
|
||
Permission is hereby granted, free of charge, to any person or organization | ||
obtaining a copy of the software and accompanying documentation covered by | ||
this license (the "Software") to use, reproduce, display, distribute, | ||
execute, and transmit the Software, and to prepare derivative works of the | ||
Software, and to permit third-parties to whom the Software is furnished to | ||
do so, all subject to the following: | ||
|
||
The copyright notices in the Software and this entire statement, including | ||
the above license grant, this restriction and the following disclaimer, | ||
must be included in all copies of the Software, in whole or in part, and | ||
all derivative works of the Software, unless such copies or derivative | ||
works are solely in the form of machine-executable object code generated by | ||
a source language processor. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT | ||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE | ||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
= run-cpt | ||
:toc: preamble | ||
|
||
[link=https://github.com/grisumbras/run-cpt/actions] | ||
image::https://github.com/grisumbras/run-cpt/workflows/ci/badge.svg[Build status] | ||
|
||
____ | ||
GitHub Action that runs conan_package_tools | ||
____ | ||
|
||
|
||
== Usage | ||
|
||
Example usage: | ||
|
||
[source,yaml] | ||
---- | ||
uses: grisumbras/run-cpt@latest | ||
with: | ||
build-script: conan/build.py | ||
---- | ||
|
||
You can set environment variables that control Conan and CPT behaviour using | ||
`env` key: | ||
|
||
[source,yaml] | ||
---- | ||
- uses: grisumbras/run-cpt@latest | ||
env: | ||
CONAN_REMOTES: https://api.bintray.com/conan/bincrafters/public-conan | ||
---- | ||
|
||
Additionally, if `CONAN_USERNAME` is not specified, the first part of | ||
`GITHUB_REPOSITORY` (before slash) will be used. | ||
|
||
|
||
== Inputs | ||
|
||
=== `build-script` | ||
|
||
Path to the build script. Given `build-script: x/y/z.py`, the action will run | ||
`python x/y/z.py`. | ||
|
||
|
||
== Maintainer | ||
Dmitry Arkhipov <[email protected]> | ||
|
||
|
||
== Contributing | ||
Patches welcome! | ||
|
||
|
||
== License | ||
link:LICENSE[BSL-1.0] (C) 2019 Dmitry Arkhipov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: run-cpt | ||
author: Dmitry Arkhipov <[email protected]> | ||
description: Runs conan_package_tools | ||
branding: | ||
icon: package | ||
color: blue | ||
inputs: | ||
build-script: | ||
description: Path to the build script | ||
required: false | ||
default: build.py | ||
runs: | ||
using: node12 | ||
main: main.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const core = require('@actions/core'); | ||
const exec = require('@actions/exec'); | ||
|
||
|
||
function get_username() { | ||
const repo = process.env['GITHUB_REPOSITORY'] || ''; | ||
return (repo.split('/', 1) || [''])[0]; | ||
}; | ||
|
||
|
||
async function run() { | ||
try { | ||
console.log('Installing conan_package_tools...') | ||
await exec.exec('pip', ['install', 'conan_package_tools']); | ||
|
||
const conan_username = process.env['CONAN_USERNAME'] || get_username(); | ||
const opts | ||
= { env: Object.assign({CONAN_USERNAME: conan_username}, process.env) | ||
}; | ||
|
||
console.log('Running conan_package_tools...') | ||
await exec.exec('python', [core.getInput('build-script')], opts); | ||
} catch (error) { | ||
core.setFailed(error.message); | ||
} | ||
} | ||
|
||
run() |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.