From 4a3829ab8ffd9fff83056428ae2ead6dcb642733 Mon Sep 17 00:00:00 2001 From: Marc Monnerat swisstopo Date: Mon, 10 Jun 2024 10:59:12 +0200 Subject: [PATCH] cleaning up actions --- .github/workflows/build.yaml | 8 +++++--- .github/workflows/deploy.yaml | 12 ++++++------ .github/workflows/release.yaml | 21 +++++++++++++++++++-- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a393fa7..17a6724 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,8 +1,8 @@ -name: Build PDF with Pandoc +name: build on: - workflow_dispatch: + workflow_call: push: branches: - master @@ -13,6 +13,7 @@ on: - develop - 'releases/**' + jobs: build-markdown: name: Generating Markdown files @@ -25,7 +26,8 @@ jobs: - name: Install Pandoc run: sudo apt-get install -y pandoc - - uses: actions/checkout@v4 + - name: Checkout coded_domains + uses: actions/checkout@v4 - name: Install miniconda uses: conda-incubator/setup-miniconda@v3 with: diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 72a5aea..17ccd47 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -3,16 +3,16 @@ name: Upload to S3 on: workflow_dispatch: push: - branches: - - master + tags: # trigger the deploy job on tag creation + - * jobs: + build: + uses: ./.github/workflows/build.yml # use the callable build job to run build deploy: - runs-on: ubuntu-latest - + # runs-on: ubuntu-latest + needs: [build] # require build to pass before deploy runs steps: - - uses: actions/checkout@master - - name: Upload folder to bucket uses: a-sync/s3-uploader@master with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index db38a58..8625c18 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,12 +6,26 @@ on: tags: - "v*.*.*" + +# cat .github/workflows/deploy.yml +name: deploy +on: + push: + tags: # trigger the deploy job on tag creation + - * +jobs: + + deploy: + name: deploy + needs: [tests] # require tests to pass before deploy runs + jobs: build: + uses: ./.github/workflows/build.yml # use the callable build job to run build + release: runs-on: ubuntu-latest + needs: [build] # require build to pass before deploy runs steps: - - name: Checkout - uses: actions/checkout@v4 - name: Build run: echo ${{ github.sha }} > Release.txt - name: Test @@ -25,3 +39,6 @@ jobs: Release.txt output/datamodel_de.pdf output/datamodel_fr.pdf + output/datamodel_de.docx + output/datamodel_fr.docx + output/ER-GCOVER.svg