Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit fd401e4

Browse files
committed
alice: hosted jobs: please: contribute: recommended community standards: Fist attempt at job
Signed-off-by: John Andersen <[email protected]>
1 parent 5b53a7d commit fd401e4

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Alice Please Contribute Recommended Community Standards
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
repo_url:
7+
description: 'URL of git repo to contribute community standards to'
8+
required: true
9+
type: string
10+
11+
12+
jobs:
13+
contribute:
14+
name: Contribute
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Set up Python 3.9
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: 3.9
21+
- name: Install github CLI
22+
run: |
23+
set -x
24+
python -c 'import sys, functools, urllib.request; print(urllib.request.urlretrieve(sys.argv[-2], filename=sys.argv[-1], reporthook=lambda n, c, t: print(f"{round(((n*c)/t) * 100, 2)}%", end="\r", file=sys.stderr))[0])' https://github.com/cli/cli/releases/download/v2.12.1/gh_2.12.1_linux_amd64.deb gh_2.12.1_linux_amd64.deb
25+
dpkg -i gh_2.12.1_linux_amd64.deb
26+
- name: Configure github CLI auth
27+
env:
28+
GH_USER: aliceoa
29+
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN_ALICE_PLEASE_CONTRIBUTE }}
30+
run: |
31+
mkdir -p ~/.config/gh/
32+
echo "github.com:" > ~/.config/gh/hosts.yml
33+
echo " oauth_token: ${GH_ACCESS_TOKEN}" >> ~/.config/gh/hosts.yml
34+
echo " user: ${GH_USER}" >> ~/.config/gh/hosts.yml
35+
echo " git_protocol: https" >> ~/.config/gh/hosts.yml
36+
gh auth setup-git
37+
- name: Install python dependencies
38+
run: |
39+
set -x
40+
pip install -U pip setuptools wheel
41+
- name: Install dependencies
42+
run: |
43+
set -x
44+
export ALICE_STATE_OF_ART_COMMIT=cdec226e72316121d7399a3b171253bde0ce62d9
45+
# TODO Update dffml to install from next release once rolled (0.5.0).
46+
pip install \
47+
"https://github.com/intel/dffml/archive/${ALICE_STATE_OF_ART_COMMIT}.zip#egg=dffml" \
48+
"https://github.com/intel/dffml/archive/${ALICE_STATE_OF_ART_COMMIT}.zip#egg=dffml-feature-git&subdirectory=feature/git" \
49+
"https://github.com/intel/dffml/archive/${ALICE_STATE_OF_ART_COMMIT}.zip#egg=shouldi&subdirectory=examples/shouldi" \
50+
"https://github.com/intel/dffml/archive/${ALICE_STATE_OF_ART_COMMIT}.zip#egg=dffml-config-yaml&subdirectory=configloader/yaml" \
51+
"https://github.com/intel/dffml/archive/${ALICE_STATE_OF_ART_COMMIT}.zip#egg=dffml-source-mongodb&subdirectory=source/mongodb" \
52+
"https://github.com/intel/dffml/archive/${ALICE_STATE_OF_ART_COMMIT}.zip#egg=dffml-operations-innersource&subdirectory=operations/innersource" \
53+
"https://github.com/intel/dffml/archive/${ALICE_STATE_OF_ART_COMMIT}.zip#egg=alice&subdirectory=entities/alice"
54+
- name: DFFML Version
55+
run: dffml version
56+
- name: Make contribution
57+
env:
58+
REPO_URL: ${{ github.event.inputs.repo_url }}
59+
run: |
60+
set -x
61+
pwd
62+
cd $(mktemp -d)
63+
pwd
64+
alice please contribute -repos "${REPO_URL}" -log debug -- recommended community standards

0 commit comments

Comments
 (0)