Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .github/workflows/build_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,8 @@ on:
- 'v*.*.*'

jobs:
lint:
uses: ./.github/workflows/test_job.yml

build-and-push-image:
runs-on: ubuntu-latest
needs: lint
permissions:
contents: write
packages: write
Expand Down Expand Up @@ -132,7 +128,7 @@ jobs:

bump-web-version:
runs-on: ubuntu-latest
needs: [build-and-push-image, lint]
needs: [build-and-push-image]
if: github.event_name != 'workflow_dispatch'
permissions:
contents: write
Expand Down
39 changes: 26 additions & 13 deletions .github/workflows/test_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
submodules: recursive
- name: Create conda env
# https://github.com/marketplace/actions/setup-micromamba
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v3
with:
environment-name: freva-web
environment-file: dev-env.yml
Expand All @@ -32,17 +32,12 @@ jobs:
- name: Run build checks for js and python smoke tests
run: micromamba run -n freva-web make tests

multi-platform-build:
build-docker-image:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login != 'dependabot[bot]'
permissions:
contents: write
packages: write
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
- linux/ppc64le
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -52,9 +47,6 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

Expand All @@ -63,15 +55,36 @@ jobs:
npm install
npm run build-production

- name: Build freva-web image for ${{ matrix.platform }}
- name: Build freva-web image for
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
build-args: |
VERSION=test
BUNDLE_HOST_PATH=${{ github.workspace }}
platforms: ${{ matrix.platform }}
push: false
no-cache: true
tags: freva-web:latest

dependabot:
name: Merge PR by dependabot
runs-on: ubuntu-latest
needs: [Smoke-tests]
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve dependabot's PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.TOKEN}}
- name: Auto-merge for dependabot's PR
run: gh pr merge --merge --auto "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.TOKEN}}
Loading