Skip to content
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

build(pr): dedicate step for uncommitted files check #271

Merged
merged 1 commit into from
Apr 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 35 additions & 4 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@ jobs:
run: |
yarn workspace @telekom/scale-components build

- name: Check for uncommitted changes
run: |
sh scripts/porcelain.sh

- name: Build Storybook
run: |
yarn workspace @telekom/scale-storybook-vue build --quiet
Expand All @@ -171,3 +167,38 @@ jobs:
with:
name: diff-output
path: packages/visual-tests/src/__image_snapshots__/__diff_output__

uncommitted-changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Restore Lerna
id: yarn-cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install project dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn

- name: Run Lerna bootstrap
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn bootstrap

- name: Generate files
run: |
yarn lerna run generate

- name: Build Components
run: |
yarn workspace @telekom/scale-components build

- name: Check for uncommitted changes
run: |
sh scripts/porcelain.sh
8 changes: 3 additions & 5 deletions scripts/porcelain.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
source ./scripts/_colors.sh;
source ./scripts/_header.sh;
echo "--------"
echo "${GREEN}Check for uncommitted build outputs...${NC}"
echo "Check for uncommitted build outputs..."
echo "--------"
if [ -z $(git status --porcelain) ];
then
echo "${GREEN}Working copy is clean"
echo "Working copy is clean"
else
echo "${RED}Please commit your changes"
echo "Please commit your changes"
git status
exit 1
fi