Skip to content

Bump github/super-linter from 6 to 7 (#4208) #3266

Bump github/super-linter from 6 to 7 (#4208)

Bump github/super-linter from 6 to 7 (#4208) #3266

Workflow file for this run

name: Pipeline
on:
push:
branches:
- main
workflow_dispatch: # Can be triggered manually from a branch
inputs:
force-deploy:
description: Force re-tagging and deployment of images
type: boolean
default: false
jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
with:
push: true
force-deploy: "${{ inputs.force-deploy || false }}"
secrets: inherit
post-build:
name: Post-build
runs-on: ubuntu-latest
needs: build
outputs:
changes: ${{ steps.merge-changes.outputs.changes }}
version: ${{ needs.build.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Merge changes from the matrix build
id: merge-changes
uses: ./.github/actions/merge-changes
analyse:
name: Analyse
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/analyse
with:
token: ${{ secrets.SONAR_TOKEN }}
deploy-to-test:
name: Deploy to test
uses: ./.github/workflows/deploy.yml
needs: post-build
if: ${{ needs.post-build.outputs.changes != '[]' }}
with:
environment: test
version: ${{ needs.post-build.outputs.version }}
projects: ${{ needs.post-build.outputs.changes }}
secrets: inherit
deploy-to-preprod:
name: Deploy to preprod
uses: ./.github/workflows/deploy.yml
needs: post-build
if: ${{ needs.post-build.outputs.changes != '[]'}}
with:
environment: preprod
version: ${{ needs.post-build.outputs.version }}
projects: ${{ needs.post-build.outputs.changes }}
secrets: inherit
end-to-end-tests:
name: Run end-to-end tests
needs:
- post-build
- deploy-to-test
- deploy-to-preprod
runs-on: ubuntu-latest
timeout-minutes: 60
outputs:
failed-projects: ${{ steps.run.outputs.failed-projects }}
passed-projects: ${{ steps.run.outputs.passed-projects }}
report-url: ${{ steps.run.outputs.report-url }}
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.BOT_APP_ID }}
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
repositories: hmpps-probation-integration-e2e-tests
- name: Run tests
id: run
uses: ministryofjustice/hmpps-probation-integration-e2e-tests/.github/actions/run-tests@main
with:
projects: ${{ needs.post-build.outputs.changes }}
token: ${{ steps.app-token.outputs.token }}
report-test-failures:
name: Failed testing
if: ${{ failure() && needs.end-to-end-tests.outputs.failed-projects != '[]' }}
needs:
- end-to-end-tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project: ${{ fromJson(needs.end-to-end-tests.outputs.failed-projects) }}
steps:
- run: 'echo Tests failed for ${{ matrix.project }}. View the full report here: ${{ needs.end-to-end-tests.outputs.report-url }}; exit 1'
deploy-to-prod:
name: Deploy to production
uses: ./.github/workflows/deploy.yml
if: ${{ (success() || (failure() && needs.end-to-end-tests.outputs.passed-projects != '[]')) && github.ref == 'refs/heads/main' }}
needs:
- post-build
- end-to-end-tests
with:
environment: prod
version: ${{ needs.post-build.outputs.version }}
projects: ${{ needs.end-to-end-tests.outputs.passed-projects }}
secrets: inherit