aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/main.yaml
blob: 7151c9aa4d2fbaadc2f0d20585e59e7dfd64f827 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI

on:
  push:
    branches:
    - main
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  lint-test:
    uses: ./.github/workflows/lint-test.yaml

  fixup-commit-blocker:
    if: github.ref != 'refs/heads/main'
    uses: python-discord/.github/.github/workflows/block-fixup-commits.yaml@main
    needs: lint-test

  generate-sha-tag:
    runs-on: ubuntu-latest
    outputs:
      sha-tag: ${{ steps.sha-tag.outputs.sha-tag }}
    steps:
      - name: Create SHA Container tag
        id: sha-tag
        run: |
          tag=$(cut -c 1-7 <<< $GITHUB_SHA)
          echo "sha-tag=$tag" >> $GITHUB_OUTPUT

  publish-static-preview:
    uses: ./.github/workflows/static-preview.yaml
    needs:
      - generate-sha-tag
    with:
      sha-tag: ${{ needs.generate-sha-tag.outputs.sha-tag }}

  build-deploy:
    if: github.ref == 'refs/heads/main'
    uses: ./.github/workflows/build-deploy.yaml
    needs:
      - lint-test
      - generate-sha-tag
    with:
      sha-tag: ${{ needs.generate-sha-tag.outputs.sha-tag }}
    secrets: inherit

  sentry-release:
    if: github.ref == 'refs/heads/main'
    uses: ./.github/workflows/sentry-release.yaml
    needs:
      - build-deploy
    secrets: inherit