refactor (#5) #34
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
name: test | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
push: | |
branches: ["main"] | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: npm clean-install | |
- run: npm run format-check | |
- run: npm run build | |
- 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 | |
login: | |
needs: validate | |
environment: dhaka | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup cf cli | |
uses: ./ | |
with: | |
api: ${{ secrets.CF_API }} | |
username: ${{ secrets.CF_USERNAME }} | |
password: ${{ secrets.CF_PASSWORD }} | |
org: ${{ secrets.CF_ORG }} | |
space: ${{ secrets.CF_SPACE }} | |
- name: access cloud foundry api | |
run: cf stacks |