-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
67 additions
and
39 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,54 @@ | ||
name: Check CI | ||
|
||
on: | ||
# Run on pull requests to primary branches | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
- dev | ||
paths: | ||
- '.github/workflows/check.yml' | ||
- 'app/**' | ||
- 'docker-compose*.yml' | ||
|
||
# Run on manual triggers | ||
workflow_dispatch: | ||
|
||
# Set GITHUB_TOKEN permissions | ||
permissions: | ||
contents: read | ||
|
||
# Set workflow concurrency rules | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
# Build job | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build for production | ||
env: | ||
GITHUB_REPOSITORY_URL: https://github.com/${{ github.repository }} | ||
GITHUB_SHA: ${{ github.sha }} | ||
BUILD_CHECK: "true" | ||
run: docker compose -f docker-compose.yml -f docker-compose.cicd.yml build | ||
|
||
- name: Copy application files | ||
run: docker compose -f docker-compose.yml -f docker-compose.cicd.yml run --rm app | ||
|
||
- name: Check application files | ||
run: | | ||
[ -d ./app/dist ] && [ $(ls -1 ./app/dist | wc -l) -gt 0 ] \ | ||
&& echo "Application files found" \ | ||
|| ( echo "No application files found" && exit 1 ) |
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
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