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
3 changes: 3 additions & 0 deletions .github/workflows/linting-and-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
description: "Secret to authenticate if using an other container registry than Github"
required: false

permissions:
contents: read

env:
IMAGE_REGISTRY: ghcr.io
REGISTRY_USER: $GITHUB_ACTOR
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/on-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ on:
pull_request:
types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
linting-and-checks:
name: "Linting and checks"
uses: ./.github/workflows/linting-and-checks.yaml

tests:
name: "Tests"
permissions:
contents: read
packages: read
uses: ./.github/workflows/tests.yaml
14 changes: 14 additions & 0 deletions .github/workflows/on-push-main-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,34 @@ on:
branches:
- main

permissions:
contents: read

jobs:
linting-and-checks:
name: "Linting and checks"
uses: ./.github/workflows/linting-and-checks.yaml

tests:
name: "Tests"
permissions:
contents: read
packages: read
uses: ./.github/workflows/tests.yaml

docs:
needs: tests
name: "Build and publish docs"
permissions:
contents: write
uses: ./.github/workflows/publish-docs.yaml

publish-latest:
needs: tests
name: "Publish dev docker images"
permissions:
contents: read
packages: write
uses: ./.github/workflows/publish-image.yaml
with:
image-tags: latest
Expand All @@ -46,6 +57,9 @@ jobs:
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
name: "Publish staging docker images"
permissions:
contents: read
packages: write
uses: ./.github/workflows/publish-image.yaml
with:
image-tags: ${{ needs.release-please.outputs.tag_name }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
workflow_dispatch:
workflow_call:

permissions:
contents: write

env:
GITHUB_PAGES_BRANCH: gh-pages

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
description: "Secret to authenticate if using an other container registry than Github"
required: false

permissions:
contents: read
packages: write

env:
API_IMAGE: ghcr.io/equinor/template-fastapi-react/api
NGINX_IMAGE: ghcr.io/equinor/template-fastapi-react/nginx
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
description: "The released tag. Ex 'v1.2.3'"
value: ${{ jobs.release-please.outputs.tag_name }}

permissions:
contents: read

jobs:
release-please:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
description: "Secret to authenticate if using an other container registry than Github"
required: false

permissions:
contents: read
packages: read

env:
API_IMAGE: ghcr.io/equinor/template-fastapi-react/api
WEB_IMAGE: ghcr.io/equinor/template-fastapi-react/web
Expand Down
Loading