Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
qoomon committed Jul 16, 2024
1 parent 5713b2a commit e07d295
Show file tree
Hide file tree
Showing 11 changed files with 2,349 additions and 3,316 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/action-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Action > Build
on:
push:
branches: ['**']
paths:
- action/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -31,9 +33,11 @@ jobs:
- run: npm run build

# Verify that the dist/ is up-to-date
- run: |
git_diff="$(git diff --name-only dist/)"
- name: Verify Action release
run: |
git_diff="$(git diff --ignore-cr-at-eol dist/)"
if [ -n "$git_diff" ]; then
echo "Drift detected in dist/ directory"
echo "::error::Drift detected in dist/ directory"
echo "$git_diff"
exit 1
fi
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
name: Action > Regression Test

on:
workflow_dispatch:
schedule:
- cron: '0 12 * * *' # daily at 12:00
push:
branches:
- main
paths:
- action/dist/**
workflow_run:
workflows:
- "Server > Build"
types:
- completed
schedule:
- cron: '0 12 * * *' # daily at 12:00
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
RepoAccess:
build:
runs-on: ubuntu-latest
permissions:
checks: read
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
Expand All @@ -19,9 +31,9 @@ jobs:
with:
permissions: |
secrets: write
- run: >-
gh secret set RAINBOW_API_KEY
gh secret set RAINBOW_API_KEY
--body "Unicorn-$(date +%s)"
--app actions
--repo $GITHUB_REPOSITORY
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/server-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Server > Build
on:
push:
branches: ['**']
paths:
- server/**
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -27,7 +30,7 @@ jobs:
cache-dependency-path: server/package-lock.json
node-version: '20'
cache: 'npm'

- run: npm ci
- run: npm run test
- run: npm run build

1 change: 0 additions & 1 deletion action/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/node_modules/
/coverage/
/dist/
Loading

0 comments on commit e07d295

Please sign in to comment.