mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 07:39:41 +02:00
dev: add pull request image build workflow (#5235)
This commit is contained in:
parent
07cd98c125
commit
b994d27b0c
8 changed files with 58 additions and 32 deletions
|
@ -1,4 +1,4 @@
|
||||||
name: Package build
|
name: Build Package
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
7
.github/workflows/e2e.yml
vendored
7
.github/workflows/e2e.yml
vendored
|
@ -3,15 +3,8 @@ on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-package:
|
|
||||||
name: "Build Python package"
|
|
||||||
uses: ./.github/workflows/partial-package.yml
|
|
||||||
with:
|
|
||||||
tag: e2e
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
needs: build-package
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
|
|
17
.github/workflows/nightly.yml
vendored
17
.github/workflows/nightly.yml
vendored
|
@ -18,13 +18,19 @@ concurrency:
|
||||||
jobs:
|
jobs:
|
||||||
backend-tests:
|
backend-tests:
|
||||||
name: "Backend Server Tests"
|
name: "Backend Server Tests"
|
||||||
uses: ./.github/workflows/partial-backend.yml
|
uses: ./.github/workflows/test-backend.yml
|
||||||
|
|
||||||
frontend-tests:
|
frontend-tests:
|
||||||
name: "Frontend Tests"
|
name: "Frontend Tests"
|
||||||
uses: ./.github/workflows/partial-frontend.yml
|
uses: ./.github/workflows/test-frontend.yml
|
||||||
|
|
||||||
build-release:
|
build-package:
|
||||||
|
name: Build Package
|
||||||
|
uses: ./.github/workflows/build-package.yml
|
||||||
|
with:
|
||||||
|
tag: nightly
|
||||||
|
|
||||||
|
publish:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
@ -35,10 +41,11 @@ jobs:
|
||||||
id-token: write
|
id-token: write
|
||||||
name: Build Tagged Release
|
name: Build Tagged Release
|
||||||
if: github.repository == 'mealie-recipes/mealie'
|
if: github.repository == 'mealie-recipes/mealie'
|
||||||
uses: ./.github/workflows/partial-builder.yml
|
uses: ./.github/workflows/publish.yml
|
||||||
needs:
|
needs:
|
||||||
- frontend-tests
|
- frontend-tests
|
||||||
- backend-tests
|
- backend-tests
|
||||||
|
- build-package
|
||||||
with:
|
with:
|
||||||
tag: nightly
|
tag: nightly
|
||||||
secrets:
|
secrets:
|
||||||
|
@ -49,7 +56,7 @@ jobs:
|
||||||
name: Notify Discord
|
name: Notify Discord
|
||||||
if: github.repository == 'mealie-recipes/mealie'
|
if: github.repository == 'mealie-recipes/mealie'
|
||||||
needs:
|
needs:
|
||||||
- build-release
|
- publish
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Discord notification
|
- name: Discord notification
|
||||||
|
|
|
@ -16,14 +16,7 @@ on:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-package:
|
|
||||||
name: "Build Python package"
|
|
||||||
uses: ./.github/workflows/partial-package.yml
|
|
||||||
with:
|
|
||||||
tag: ${{ inputs.tag }}
|
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
needs: build-package
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
38
.github/workflows/pull-requests.yml
vendored
38
.github/workflows/pull-requests.yml
vendored
|
@ -16,20 +16,16 @@ jobs:
|
||||||
|
|
||||||
backend-tests:
|
backend-tests:
|
||||||
name: "Backend Server Tests"
|
name: "Backend Server Tests"
|
||||||
uses: ./.github/workflows/partial-backend.yml
|
uses: ./.github/workflows/test-backend.yml
|
||||||
|
|
||||||
frontend-tests:
|
frontend-tests:
|
||||||
name: "Frontend Tests"
|
name: "Frontend Tests"
|
||||||
uses: ./.github/workflows/partial-frontend.yml
|
uses: ./.github/workflows/test-frontend.yml
|
||||||
|
|
||||||
container-scanning:
|
container-scanning:
|
||||||
name: "Trivy Container Scanning"
|
name: "Trivy Container Scanning"
|
||||||
uses: ./.github/workflows/partial-trivy-container-scanning.yml
|
uses: ./.github/workflows/partial-trivy-container-scanning.yml
|
||||||
|
|
||||||
end-to-end:
|
|
||||||
name: "End-to-End Tests"
|
|
||||||
uses: ./.github/workflows/e2e.yml
|
|
||||||
|
|
||||||
code-ql:
|
code-ql:
|
||||||
name: "CodeQL"
|
name: "CodeQL"
|
||||||
uses: ./.github/workflows/codeql.yml
|
uses: ./.github/workflows/codeql.yml
|
||||||
|
@ -37,3 +33,33 @@ jobs:
|
||||||
actions: read
|
actions: read
|
||||||
contents: read
|
contents: read
|
||||||
security-events: write
|
security-events: write
|
||||||
|
|
||||||
|
build-package:
|
||||||
|
name: "Build Python package"
|
||||||
|
uses: ./.github/workflows/build-package.yml
|
||||||
|
with:
|
||||||
|
tag: e2e
|
||||||
|
|
||||||
|
end-to-end:
|
||||||
|
name: "End-to-End Tests"
|
||||||
|
needs: build-package
|
||||||
|
uses: ./.github/workflows/e2e.yml
|
||||||
|
|
||||||
|
publish-image:
|
||||||
|
name: "Publish PR Image"
|
||||||
|
if: contains(github.event.pull_request.labels.*.name, 'build-image')
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
# The id-token write permission is needed to connect to Depot.dev
|
||||||
|
# as part of the partial-builder.yml action. It needs to be declared
|
||||||
|
# in the parent action, as noted here:
|
||||||
|
# https://github.com/orgs/community/discussions/76409#discussioncomment-8131390
|
||||||
|
id-token: write
|
||||||
|
needs: build-package
|
||||||
|
uses: ./.github/workflows/publish.yml
|
||||||
|
with:
|
||||||
|
tag: pr-${{ github.event.pull_request.number }}
|
||||||
|
secrets:
|
||||||
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
|
@ -7,13 +7,19 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
backend-tests:
|
backend-tests:
|
||||||
name: "Backend Server Tests"
|
name: "Backend Server Tests"
|
||||||
uses: ./.github/workflows/partial-backend.yml
|
uses: ./.github/workflows/test-backend.yml
|
||||||
|
|
||||||
frontend-tests:
|
frontend-tests:
|
||||||
name: "Frontend Tests"
|
name: "Frontend Tests"
|
||||||
uses: ./.github/workflows/partial-frontend.yml
|
uses: ./.github/workflows/test-frontend.yml
|
||||||
|
|
||||||
build-release:
|
build-package:
|
||||||
|
name: Build Package
|
||||||
|
uses: ./.github/workflows/build-package.yml
|
||||||
|
with:
|
||||||
|
tag: release
|
||||||
|
|
||||||
|
publish:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
@ -23,10 +29,11 @@ jobs:
|
||||||
# https://github.com/orgs/community/discussions/76409#discussioncomment-8131390
|
# https://github.com/orgs/community/discussions/76409#discussioncomment-8131390
|
||||||
id-token: write
|
id-token: write
|
||||||
name: Build Tagged Release
|
name: Build Tagged Release
|
||||||
uses: ./.github/workflows/partial-builder.yml
|
uses: ./.github/workflows/publish.yml
|
||||||
needs:
|
needs:
|
||||||
- backend-tests
|
- backend-tests
|
||||||
- frontend-tests
|
- frontend-tests
|
||||||
|
- build-package
|
||||||
with:
|
with:
|
||||||
tag: ${{ github.event.release.tag_name }}
|
tag: ${{ github.event.release.tag_name }}
|
||||||
tags: |
|
tags: |
|
||||||
|
@ -39,7 +46,7 @@ jobs:
|
||||||
notify-discord:
|
notify-discord:
|
||||||
name: Notify Discord
|
name: Notify Discord
|
||||||
needs:
|
needs:
|
||||||
- build-release
|
- publish
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Discord notification
|
- name: Discord notification
|
||||||
|
@ -52,7 +59,7 @@ jobs:
|
||||||
update-image-tags:
|
update-image-tags:
|
||||||
name: Update image tag in sample docker-compose files
|
name: Update image tag in sample docker-compose files
|
||||||
needs:
|
needs:
|
||||||
- build-release
|
- publish
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue