Skip to content

Commit

Permalink
ci(rtd): update to trigger rtd build (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhughes-usgs authored Sep 8, 2020
1 parent 149d979 commit ef06260
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
37 changes: 20 additions & 17 deletions .github/workflows/ex-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,23 @@ jobs:
echo ${{ github.repository }}
echo ${{ github.ref }}
- name: Get Current Time
uses: 1466587594/[email protected]
id: current-time
with:
format: MM/DD/YYYY HH:mm

- name: Set current time as environmental variable
env:
TIME: "${{ steps.current-time.outputs.time }}"
F_TIME: "${{ steps.current-time.outputs.formattedTime }}"
run: |
echo "::set-env name=F_TIME::${{ steps.current-time.outputs.formattedTime }}"
echo "::set-env name=TIME::${{ steps.current-time.outputs.time }}"
echo $TIME
echo $F_TIME
echo "MODFLOW 6 examples: built at ${F_TIME}"
- name: Setup symbolic link to gfortran
run: |
sudo ln -fs /usr/bin/gfortran-9 /usr/local/bin/gfortran
Expand Down Expand Up @@ -141,7 +158,8 @@ jobs:
ls -la ./
- name: Upload build artifacts for latest release
if: github.repository_owner == 'MODFLOW-USGS' && github.ref == 'refs/heads/master'
if:
github.repository_owner == 'MODFLOW-USGS' && github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v2
with:
name: latest
Expand Down Expand Up @@ -169,27 +187,12 @@ jobs:
pwd
ls -l ./latest/
- name: Get Current Time
uses: 1466587594/[email protected]
id: current-time
with:
format: MM/DD/YYYY HH

- name: Set current time as environmental variable
env:
TIME: "${{ steps.current-time.outputs.time }}"
F_TIME: "${{ steps.current-time.outputs.formattedTime }}"
run: |
echo "::set-env name=F_TIME::${{ steps.current-time.outputs.formattedTime }}"
echo "::set-env name=TIME::${{ steps.current-time.outputs.time }}"
echo $TIME $F_TIME
- name: Create a Release
uses: ncipollo/release-action@v1
with:
tag: latest
name: latest build
body: "MODFLOW 6 examples: built at $F_TIME"
body: "MODFLOW 6 examples: built at ${F_TIME}"
allowUpdates: true
draft: false
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ex-rtd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
rtd_build:
name: latest-build
name: rtd-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -131,12 +131,11 @@ jobs:
# trigger rtd if previous job was successful
rtd:
name: Read the Docs trigger
name: rtd-trigger
needs: rtd_build
runs-on: ubuntu-latest

if:
github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push'
if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push'
steps:
- name: Trigger RTDs build on master and develop branches
uses: dfm/[email protected]
Expand Down

0 comments on commit ef06260

Please sign in to comment.