Skip to content

Commit 29420cc

Browse files
committed
travis-to-actions: initial test
1 parent 086fe26 commit 29420cc

File tree

2 files changed

+58
-24
lines changed

2 files changed

+58
-24
lines changed

.github/workflows/adabot_cron.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Update Libraries/Contributing Info
2+
3+
on:
4+
push:
5+
branches:
6+
- action-ify
7+
schedule:
8+
- cron: 45 9 * * *
9+
10+
jobs:
11+
check-repo-owner:
12+
# This job is so the entire workflow will end successfully and give some
13+
# output to explain why it hasn't run on a non-Adafruit fork.
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: repository
17+
env:
18+
OWNER_IS_ADAFRUIT: ${{ startswith(github.repository, 'adafruit/') }}
19+
run: |
20+
echo "This workflow will only run if Adafruit is the repository owner."
21+
echo "Repository owner is Adafruit: $OWNER_IS_ADAFRUIT"
22+
update-bundles:
23+
runs-on: ubuntu-latest
24+
# Only run the build on Adafruit's repository. Forks won't have the secrets.
25+
# Its necessary to do this here, since 'schedule' events cannot (currently)
26+
# be limited (they run on all forks' default branches).
27+
#if: startswith(github.repository, 'adafruit/')
28+
steps:
29+
- name: Dump GitHub context
30+
env:
31+
GITHUB_CONTEXT: ${{ toJson(github) }}
32+
run: echo "$GITHUB_CONTEXT"
33+
- name: Set up Python 3.6
34+
uses: actions/setup-python@v1
35+
with:
36+
python-version: 3.6
37+
- name: Versions
38+
run: |
39+
python3 --version
40+
- uses: actions/checkout@v1
41+
with:
42+
submodules: true
43+
- name: Install deps
44+
run: |
45+
pip install -r adabot/requirements.txt
46+
- name: Make Directory For Report Files
47+
run: mkdir -p bin/adabot
48+
- name: Run adabot.update_cp_org_libraries
49+
run: |
50+
python3 -u -m adabot.update_cp_org_libraries -o bin/adabot/libraries.v2.json
51+
- name: Check For Files
52+
run: |
53+
ls bin/adabot
54+
- name: Upload Reports To AWS S3
55+
env:
56+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
57+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
58+
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/adabot/ s3://sommersoft-travis-testing/adabot/web/ --recursive --no-progress --region us-east-1"

.travis.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)