travis-to-actions: initial test
This commit is contained in:
parent
086fe26137
commit
29420cc973
2 changed files with 58 additions and 24 deletions
58
.github/workflows/adabot_cron.yml
vendored
Normal file
58
.github/workflows/adabot_cron.yml
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
name: Update Libraries/Contributing Info
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- action-ify
|
||||
schedule:
|
||||
- cron: 45 9 * * *
|
||||
|
||||
jobs:
|
||||
check-repo-owner:
|
||||
# This job is so the entire workflow will end successfully and give some
|
||||
# output to explain why it hasn't run on a non-Adafruit fork.
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: repository
|
||||
env:
|
||||
OWNER_IS_ADAFRUIT: ${{ startswith(github.repository, 'adafruit/') }}
|
||||
run: |
|
||||
echo "This workflow will only run if Adafruit is the repository owner."
|
||||
echo "Repository owner is Adafruit: $OWNER_IS_ADAFRUIT"
|
||||
update-bundles:
|
||||
runs-on: ubuntu-latest
|
||||
# Only run the build on Adafruit's repository. Forks won't have the secrets.
|
||||
# Its necessary to do this here, since 'schedule' events cannot (currently)
|
||||
# be limited (they run on all forks' default branches).
|
||||
#if: startswith(github.repository, 'adafruit/')
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
run: echo "$GITHUB_CONTEXT"
|
||||
- name: Set up Python 3.6
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.6
|
||||
- name: Versions
|
||||
run: |
|
||||
python3 --version
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: true
|
||||
- name: Install deps
|
||||
run: |
|
||||
pip install -r adabot/requirements.txt
|
||||
- name: Make Directory For Report Files
|
||||
run: mkdir -p bin/adabot
|
||||
- name: Run adabot.update_cp_org_libraries
|
||||
run: |
|
||||
python3 -u -m adabot.update_cp_org_libraries -o bin/adabot/libraries.v2.json
|
||||
- name: Check For Files
|
||||
run: |
|
||||
ls bin/adabot
|
||||
- name: Upload Reports To AWS S3
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/adabot/ s3://sommersoft-travis-testing/adabot/web/ --recursive --no-progress --region us-east-1"
|
||||
24
.travis.yml
24
.travis.yml
|
|
@ -1,24 +0,0 @@
|
|||
# TravisCI config for circuitpython.org
|
||||
|
||||
# only run if triggered by a cron
|
||||
if: type = cron
|
||||
|
||||
dist: xenial
|
||||
language: python
|
||||
python: "3.6"
|
||||
|
||||
install:
|
||||
- pip install -r adabot/requirements.txt
|
||||
|
||||
addons:
|
||||
artifacts:
|
||||
paths:
|
||||
- $(ls web/* | tr "\n" ":")
|
||||
target_paths: /adabot
|
||||
debug: true
|
||||
|
||||
script:
|
||||
- mkdir -p web
|
||||
- cd adabot
|
||||
- python -u -m adabot.update_cp_org_libraries -o $TRAVIS_BUILD_DIR/web/libraries.v2.json
|
||||
- cd ..
|
||||
Loading…
Reference in a new issue