forked from HinodeXRT/xrtpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a GitHub Action to automatically update the data files,address issue HinodeXRT#80
- Loading branch information
1 parent
9fe0b6d
commit 0f7855d
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Check Hinode X-Ray Telescope CCD Contamination Data Update | ||
|
||
on: | ||
schedule: | ||
- cron: 0 0 1 * * # Runs the workflow at 00:00 on the 1st day of every month | ||
|
||
jobs: | ||
check-update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check for Contamination Data Update | ||
id: check-update | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const url = 'https://hesperia.gsfc.nasa.gov/ssw/hinode/xrt/idl/response/contam/xrt_contam_on_ccd.geny'; | ||
const response = await fetch(url); | ||
const data = await response.text(); | ||
console.log(data); | ||
return data; | ||
- name: Notify if Update Detected | ||
if: ${{ steps.check-update.outputs.data != 'OLD_FILE_CONTENTS' }} | ||
run: echo "Contamination data file has been updated. Review and merge changes." |