Update Node.js to c52e208 #842
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- main | |
workflow_call: | |
concurrency: build-${{ github.ref }} | |
env: | |
DOCKER_BUILDKIT: '1' # BuildKit is enabled by default starting in Docker v23, Ubuntu 22.04 has an older version | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
permissions: | |
packages: write | |
name: 01-build.sh | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Send build status "in progress" | |
if: github.ref == 'refs/heads/main' | |
uses: ./.github/actions/build_status | |
with: | |
task: build-image | |
status: inProgress | |
api_key: ${{ secrets.RADIATOR_AUTH_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run 01-build.sh | |
run: ./deploy-scripts/01-build.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
server_tests: | |
permissions: | |
id-token: write | |
contents: read | |
name: 02-run-server-tests.sh | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Configure untuva AWS credentials | |
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4 | |
with: | |
role-to-assume: arn:aws:iam::782034763554:role/ludos-github-actions-role-untuva | |
aws-region: eu-west-1 | |
- name: Run 02-run-server-tests.sh | |
run: ./deploy-scripts/02-run-server-tests.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
playwright_tests: | |
permissions: | |
id-token: write | |
contents: read | |
needs: ['build'] | |
name: 03-run-playwright-tests.sh | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Configure untuva AWS credentials | |
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4 | |
with: | |
role-to-assume: arn:aws:iam::782034763554:role/ludos-github-actions-role-untuva | |
aws-region: eu-west-1 | |
- name: Run 03-run-playwright-tests.sh | |
run: ./deploy-scripts/03-run-playwright-tests.sh | |
env: | |
LUDOS_PALVELUKAYTTAJA_USERNAME: ${{ secrets.LUDOS_PALVELUKAYTTAJA_USERNAME }} | |
LUDOS_PALVELUKAYTTAJA_PASSWORD: ${{ secrets.LUDOS_PALVELUKAYTTAJA_PASSWORD }} | |
lint: | |
name: 04-lint.sh | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Run 04-lint.sh | |
run: ./deploy-scripts/04-lint.sh | |
frontend_unit_tests: | |
name: 06-run-frontend-unittests.sh | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Run 06-run-frontend-unittests.sh | |
run: ./deploy-scripts/06-run-frontend-unittests.sh | |
push_image: | |
name: 05-push-image.sh | |
if: github.ref == 'refs/heads/main' | |
needs: [lint, build, server_tests, playwright_tests, frontend_unit_tests] | |
permissions: | |
packages: read | |
id-token: write | |
runs-on: 'ubuntu-24.04' | |
steps: | |
- name: Fetch history for all branches and tags | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Push image | |
uses: ./.github/actions/push_image | |
with: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
build_status_completed: | |
name: Send build status | |
needs: [push_image] | |
if: ${{ always() && github.ref == 'refs/heads/main' }} | |
continue-on-error: true | |
runs-on: 'ubuntu-24.04' | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: ./.github/actions/build_status | |
with: | |
task: build-image | |
status: ${{ needs.push_image.result == 'success' && 'success' || 'failure' }} | |
api_key: ${{ secrets.RADIATOR_AUTH_TOKEN }} | |
deploy_untuva: | |
needs: [push_image] | |
uses: ./.github/workflows/deploy_untuva.yml | |
secrets: inherit |