Skip to content

Commit

Permalink
Create check_contamination_data.yml
Browse files Browse the repository at this point in the history
Create a GitHub Action to automatically update the data files,address issue HinodeXRT#80
  • Loading branch information
joyvelasquez authored Feb 8, 2024
1 parent 9fe0b6d commit 0f7855d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/check_contamination_data.yml
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."

0 comments on commit 0f7855d

Please sign in to comment.