1
0
Fork 0
mirror of https://github.com/docker/login-action.git synced 2025-04-02 05:00:06 +02:00
login-action/.github/workflows/check-dist.yml
jongwooo 944a7dc4a2 Create check-dist.yml
Signed-off-by: jongwooo <jongwooo.han@gmail.com>
2022-12-15 15:32:19 +09:00

50 lines
1 KiB
YAML

name: check dist/
on:
push:
branches:
- master
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
jobs:
check-dist:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
-
name: Install Dependencies
run: yarn install --frozen-lockfile
-
name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
id: diff
-
name: Upload the expected version as an artifact
uses: actions/upload-artifact@v2
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
path: dist/