-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): Create continuous integration and deployment piplines
* Run `next lint` on pull requests * Publish container images to ghcr.io
- Loading branch information
Showing
6 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Release | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- 'v*.*.*' | ||
|
||
jobs: | ||
release-next-container: | ||
uses: radiorabe/actions/.github/workflows/[email protected] | ||
with: | ||
image: 'ghcr.io/radiorabe/website-stack/next' | ||
name: 'next' | ||
display-name: 'RaBe Nextjs Website' | ||
tags: 'rabe web nextjs alpine' | ||
# the alpine base image used for the nextjs frontend does not have a | ||
# keyless cosign signature, so we disable verifying the image. | ||
cosign-verify: false | ||
context: './next/' | ||
dockerfile: './next/Dockerfile.prod' | ||
build-args: | | ||
IMAGES_HOSTNAME=*.rabe.ch |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Scheduled tasks | ||
|
||
on: | ||
schedule: | ||
- cron: '13 12 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
schedule-trivy: | ||
uses: radiorabe/actions/.github/workflows/[email protected] | ||
with: | ||
image-ref: 'ghcr.io/radiorabe/website-stack/next:latest' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
|
||
env: | ||
IMAGES_HOSTNAME: "*" | ||
|
||
jobs: | ||
next-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 22 | ||
cache: yarn | ||
cache-dependency-path: next/yarn.lock | ||
|
||
- name: Install eslint (for easier rebasing, could be added to packages.json later) | ||
working-directory: ./next | ||
run: yarn add --dev eslint-config-next 'eslint@^8' | ||
|
||
- name: Install dependencies | ||
working-directory: ./next | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Running linter | ||
working-directory: ./next | ||
run: yarn run next lint --output-file ../next-eslint_report.json --format json | ||
continue-on-error: true | ||
|
||
- name: Annotate Code Linting Results | ||
uses: ataylorme/eslint-annotate-action@v3 | ||
with: | ||
report-json: "next-eslint_report.json" | ||
only-pr-files: false | ||
continue-on-error: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["next", "next/typescript"] | ||
} |
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
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