diff --git a/.github/workflows/build_job.yml b/.github/workflows/build_job.yml index 951cade0..200fefaa 100644 --- a/.github/workflows/build_job.yml +++ b/.github/workflows/build_job.yml @@ -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 @@ -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 diff --git a/.github/workflows/test_job.yml b/.github/workflows/test_job.yml index fd9528fb..c506af5f 100644 --- a/.github/workflows/test_job.yml +++ b/.github/workflows/test_job.yml @@ -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 @@ -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 @@ -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 @@ -63,7 +55,7 @@ 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: . @@ -71,7 +63,28 @@ jobs: 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}}