From 4a378fa7ab369b1025f65ba916bce9e7e7e13d53 Mon Sep 17 00:00:00 2001 From: Anita Caron Date: Thu, 28 Oct 2021 16:22:49 +0100 Subject: [PATCH 1/7] Set up schedule job --- .github/workflows/release.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 000000000..560a97aee --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,28 @@ +name: Report Release + +# Controls when the action will run. +on: + # Triggers the workflow weekly on Mondays at 6:54 am + schedule: + - cron: '54 6 * * 1' + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job "report-release" + report-release: + # The type of runner that the job will run on + runs-on: ubuntu-latest + container: obolibrary/odkfull:v1.2.23 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + with: + ref: report-release + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: verify and build + run: mkdir resources/ASCT-b_tables && cd src && make all \ No newline at end of file From 793bde653d0fa0b22db4670cf7b1731be44d3923 Mon Sep 17 00:00:00 2001 From: Anita Caron Date: Mon, 29 Nov 2021 14:00:30 +0000 Subject: [PATCH 2/7] Create release with GA --- .github/workflows/build.yaml | 4 ++-- .github/workflows/release.yaml | 27 +++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b01abae9e..47f644925 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,7 +17,7 @@ jobs: build: # The type of runner that the job will run on runs-on: ubuntu-latest - container: obolibrary/odkfull:v1.2.23 + container: anitacaron/ccf-tools-dep # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -30,4 +30,4 @@ jobs: - name: verify and build env: DEFAULT_BRANCH: master - run: mkdir resources/ASCT-b_tables && cd src && make -f test.mk + run: mkdir resources/ASCT-b_tables && cd src && make JOBS='Kidney' diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 560a97aee..3e350c4b0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,9 +2,9 @@ name: Report Release # Controls when the action will run. on: - # Triggers the workflow weekly on Mondays at 6:54 am + # Triggers the workflow weekly on Sundays at 6:54 am schedule: - - cron: '54 6 * * 1' + - cron: '54 6 * * 0' # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -12,10 +12,13 @@ jobs: report-release: # The type of runner that the job will run on runs-on: ubuntu-latest - container: obolibrary/odkfull:v1.2.23 + container: anitacaron/ccf-tools-dep # Steps represent a sequence of tasks that will be executed as part of the job steps: + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 with: @@ -25,4 +28,20 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt - name: verify and build - run: mkdir resources/ASCT-b_tables && cd src && make all \ No newline at end of file + run: mkdir resources/ASCT-b_tables && cd src && make all + -name: Commit report + run: | + git config --global user.name 'Anita Caron' + git config --global user.email 'anitacaron@users.noreply.github.com' + git commit -am "Automated report" + git push + - name: Release + id: release-snapshot + uses: actions/create-release@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v${{ steps.date.outputs.date }} + release_name: ${{ steps.date.outputs.date }} + draft: false + prerelease: false \ No newline at end of file From db8fcf2ed526436ac8cfe1f9805ee4957d09f4a3 Mon Sep 17 00:00:00 2001 From: Anita Caron Date: Mon, 29 Nov 2021 16:35:33 +0000 Subject: [PATCH 3/7] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index b93558cc9..a90686015 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ pandas SPARQLWrapper rdflib openpyxl +requests \ No newline at end of file From 4eae68d43d71853ba2b324129123fa4c29815cb6 Mon Sep 17 00:00:00 2001 From: Anita Caron Date: Mon, 29 Nov 2021 16:38:09 +0000 Subject: [PATCH 4/7] Fix release.yaml --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3e350c4b0..b9a6da658 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,7 +16,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - name: Get current date + - name: Get current date id: date run: echo "::set-output name=date::$(date +'%Y-%m-%d')" # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -29,7 +29,7 @@ jobs: pip install -r requirements.txt - name: verify and build run: mkdir resources/ASCT-b_tables && cd src && make all - -name: Commit report + - name: Commit report run: | git config --global user.name 'Anita Caron' git config --global user.email 'anitacaron@users.noreply.github.com' From 55d4e5cb222232a01c0a83db06fdc5a476b7acf8 Mon Sep 17 00:00:00 2001 From: Anita Caron Date: Mon, 29 Nov 2021 16:38:09 +0000 Subject: [PATCH 5/7] Fix release.yaml --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3e350c4b0..f91c13385 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,4 +1,4 @@ -name: Report Release +name: Release # Controls when the action will run. on: @@ -16,7 +16,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - name: Get current date + - name: Get current date id: date run: echo "::set-output name=date::$(date +'%Y-%m-%d')" # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -29,7 +29,7 @@ jobs: pip install -r requirements.txt - name: verify and build run: mkdir resources/ASCT-b_tables && cd src && make all - -name: Commit report + - name: Commit report run: | git config --global user.name 'Anita Caron' git config --global user.email 'anitacaron@users.noreply.github.com' From 5910c4fa5a8a12038a2b931eb74eca25ea2cb511 Mon Sep 17 00:00:00 2001 From: Anita Caron Date: Tue, 30 Nov 2021 18:43:33 +0000 Subject: [PATCH 6/7] Update release.yaml --- .github/workflows/release.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f91c13385..0a380bfe9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,6 +5,9 @@ on: # Triggers the workflow weekly on Sundays at 6:54 am schedule: - cron: '54 6 * * 0' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: From 70f26b4437831c72f075ae428f11c2905d8ae12c Mon Sep 17 00:00:00 2001 From: Anita Caron Date: Tue, 30 Nov 2021 18:45:05 +0000 Subject: [PATCH 7/7] Update release.yaml --- .github/workflows/release.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0a380bfe9..ef2f75fa5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -24,8 +24,6 @@ jobs: run: echo "::set-output name=date::$(date +'%Y-%m-%d')" # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - with: - ref: report-release - name: Install dependencies run: | python -m pip install --upgrade pip