Repository navigation
chore: added GitHub Actions CI/CD workflows #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9085991
chore: added GitHub Actions CI/CD workflows
sebastian-noel 74c58c0
Initial plan
Copilot 03c44a2
Add workflow file path to docker.yml paths filter
Copilot 8d49c1b
Merge pull request #6 from GraphicsProgrammingKnights/copilot/sub-pr-5
sebastian-noel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,44 @@ | ||
| # ============================================================================= | ||
| # CI Workflow - Continuous Integration | ||
| # Runs on all PRs and pushes to main | ||
| # ============================================================================= | ||
|
|
||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| # Cancel in-progress runs when a new commit is pushed | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| # --------------------------------------------------------------------------- | ||
| # Lint and Build | ||
| # --------------------------------------------------------------------------- | ||
| ci: | ||
| name: Lint & Build | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| cache: "npm" | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run ESLint | ||
| run: npm run lint | ||
|
|
||
| - name: Build application | ||
| run: npm run build |
This file contains hidden or 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,65 @@ | ||
| # ============================================================================= | ||
| # Docker Build Workflow | ||
| # Verifies the Docker image builds successfully | ||
| # ============================================================================= | ||
|
|
||
| name: Docker Build | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "Dockerfile" | ||
| - "docker-compose.yml" | ||
| - ".dockerignore" | ||
| - "package.json" | ||
| - "package-lock.json" | ||
| - "next.config.ts" | ||
| - "app/**" | ||
| - "components/**" | ||
| - "public/**" | ||
| - "styles/**" | ||
| - ".github/workflows/docker.yml" | ||
| pull_request: | ||
| branches: [main] | ||
| paths: | ||
| - "Dockerfile" | ||
| - "docker-compose.yml" | ||
| - ".dockerignore" | ||
| - "package.json" | ||
| - "package-lock.json" | ||
| - "next.config.ts" | ||
| - "app/**" | ||
| - "components/**" | ||
| - "public/**" | ||
| - "styles/**" | ||
| - ".github/workflows/docker.yml" | ||
|
|
||
| # Cancel in-progress runs when a new commit is pushed | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| # --------------------------------------------------------------------------- | ||
| # Build Docker Image | ||
| # --------------------------------------------------------------------------- | ||
| docker-build: | ||
| name: Build Docker Image | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Build Docker image | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| push: false | ||
| tags: gpkweb:test | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
Empty file.
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this workflow uses
pathsfilters, changes to the workflow file itself won’t trigger a run on PRs/pushes. Add.github/workflows/docker.yml(and any other relevant workflow/config paths) to thepathslist so updates to the workflow get validated before merge.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback