From 312a5fda6a62acca8dbe512fe519b6e79323b820 Mon Sep 17 00:00:00 2001 From: Jakub Chrobasik Date: Fri, 24 Nov 2023 09:25:23 +0100 Subject: [PATCH 1/2] chore: a new compile GH workflow to be run on PR and commit to main --- .github/workflows/compile.yaml | 62 ++++++++++++++++++++++++++++++++++ .github/workflows/publish.yaml | 13 ------- 2 files changed, 62 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/compile.yaml diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml new file mode 100644 index 0000000..91e5a78 --- /dev/null +++ b/.github/workflows/compile.yaml @@ -0,0 +1,62 @@ +name: Publish Helm chart +on: + push: + branches: + - main + - "hotfix-[0-9]+.[0-9]+**" + pull_request: + types: + - opened + - synchronize + - reopened +jobs: + cleanup-previous-runs: + name: Cleanup previous runs + runs-on: ubuntu-latest + if: github.event.action != 'closed' + steps: + - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 + env: + GITHUB_TOKEN: "${{ secrets.RENKUBOT_GITHUB_TOKEN }}" + compile-compactor: + name: Compile Compactor tool + runs-on: ubuntu-latest + needs: [ cleanup-previous-runs ] + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: coursier/cache-action@v6.3 + - uses: VirtusLab/scala-cli-setup@v1.0.6 + with: + jvm: temurin:21 + - run: scala-cli compile compactor/src/* compactor/Compactor.scala + publish: + name: Try building images + runs-on: ubuntu-latest + needs: [ compile-compactor ] + env: + GIT_USER: Renku Bot + GIT_EMAIL: renku@datascience.ch + GITHUB_TOKEN: ${{ secrets.RENKUBOT_GITHUB_TOKEN }} + CHART_TAG: ${{ github.ref_name }} + steps: + - uses: actions/checkout@v3 + - name: Lint chart + uses: WyriHaximus/github-action-helm3@v2 + with: + exec: helm lint ./renku-jena/ + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Install python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + - name: Install dependencies + run: | + python -m pip install chartpress + - name: Build and push chart and images + run: | + chartpress --image-prefix renku/ --builder docker-buildx --platform linux/amd64 --platform linux/arm64 diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 14baddf..90941f9 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -12,19 +12,6 @@ jobs: - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 env: GITHUB_TOKEN: "${{ secrets.RENKUBOT_GITHUB_TOKEN }}" - compile-compactor: - name: Compile Compactor tool - runs-on: ubuntu-latest - needs: [ cleanup-previous-runs ] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: coursier/cache-action@v6.3 - - uses: VirtusLab/scala-cli-setup@v1.0.6 - with: - jvm: temurin:21 - - run: scala-cli compile compactor/src/* compactor/Compactor.scala publish: name: Publish runs-on: ubuntu-latest From 7836cc977c61f4c215d535d877f53e043dc27a3f Mon Sep 17 00:00:00 2001 From: Jakub Chrobasik Date: Fri, 24 Nov 2023 09:40:02 +0100 Subject: [PATCH 2/2] chore: tiny improvements to the compile workflow --- .github/workflows/compile.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index 91e5a78..b43014c 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -30,7 +30,7 @@ jobs: - uses: VirtusLab/scala-cli-setup@v1.0.6 with: jvm: temurin:21 - - run: scala-cli compile compactor/src/* compactor/Compactor.scala + - run: scala-cli compile compactor/src/* compactor/Compactor.scala; echo 'Compactor compiled' publish: name: Try building images runs-on: ubuntu-latest @@ -57,6 +57,6 @@ jobs: - name: Install dependencies run: | python -m pip install chartpress - - name: Build and push chart and images + - name: Try building chart and images run: | chartpress --image-prefix renku/ --builder docker-buildx --platform linux/amd64 --platform linux/arm64