44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
# SPDX-FileCopyrightText: 2021 Jeff Epler
|
|
#
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
name: Update DUT1 data
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 10 2 * *'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update-dut1:
|
|
runs-on: ubuntu-20.04
|
|
if: startswith(github.repository, 'jepler/')
|
|
steps:
|
|
|
|
- name: Dump GitHub context
|
|
env:
|
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
run: echo "$GITHUB_CONTEXT"
|
|
|
|
- uses: actions/checkout@v2.2.0
|
|
|
|
- name: Set up Python 3.9
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.9
|
|
|
|
- name: Install dependencies
|
|
run: pip install -r requirements-dev.txt
|
|
|
|
- name: Update DUT1 data
|
|
run: python -m wwvb.updateiers --dist
|
|
|
|
- name: Test (python 3.9)
|
|
run: python -munittest
|
|
|
|
- name: Commit updates
|
|
run: |
|
|
git config user.name "${GITHUB_ACTOR} (github actions cron)"
|
|
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
|
git remote set-url --push origin https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
|
|
if git commit -m"update iersdata" wwvb/iersdata_dist.py; then git push origin HEAD:main; fi
|