Skip to content

Commit

Permalink
fix(.github): Refactor workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
igoroctaviano committed May 8, 2024
1 parent ef78225 commit 915c5ef
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 22 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/container-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Container tests
name: slim/container-tests

on:
push:
Expand All @@ -8,10 +8,11 @@ on:

jobs:
build-and-test-containers:
name: Build and test containers
name: "Build and test containers"
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Checkout repository
uses: actions/[email protected]

- name: Setup Node
uses: actions/[email protected]
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/deploy-to-firebase.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to Firebase
name: slim/deploy-to-firebase

on:
pull_request:
Expand All @@ -8,17 +8,20 @@ on:

jobs:
deploy-firebase:
name: "Deploy to Firebase"
if: "${{ github.event.pull_request.head.repo.full_name == github.repository }}"
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Checkout repository
uses: actions/[email protected]

- name: Setup Node
uses: actions/[email protected]
with:
node-version: 20.8.1

- run: sudo npm i -g yarn
- name: Install Yarn
run: sudo npm i -g yarn

- name: Install dependencies
run: yarn
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/deploy-to-github-pages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to GitHub Pages
name: slim/deploy-to-github-pages

on:
push:
Expand All @@ -7,23 +7,25 @@ on:
branches: [master]

jobs:
deploy-gh-pages:
name: Deploying to GitHub Pages
deploy-to-github-pages:
name: "Deploy to GitHub Pages"
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Checkout to repository
uses: actions/[email protected]

- name: Setup Node
uses: actions/[email protected]
with:
node-version: 20.8.1

- run: sudo npm i -g yarn
- name: Install Yarn
run: sudo npm i -g yarn

- name: Install dependencies
run: yarn

- name: Build and deploy with gh-pages
- name: Build and deploy to GitHub Pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
yarn deploy -- -u "github-actions-bot <[email protected]>"
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: slim/release

on:
push:
Expand All @@ -7,9 +7,8 @@ on:

jobs:
release:
name: Release
name: "Bump version and cut a release"
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/[email protected]
Expand All @@ -31,7 +30,7 @@ jobs:
- name: Zip build
run: zip -r build.zip build

- name: Release
- name: Bump version and cut a release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
GIT_AUTHOR_NAME: ${{ vars.RELEASE_GIT_AUTHOR_NAME }}
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and run unit tests
name: slim/build-and-run-unit-tests

on:
push:
Expand All @@ -8,10 +8,11 @@ on:

jobs:
build-and-test:
name: Build and run unit tests
name: "Build and run unit tests"
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Checkout repository
uses: actions/[email protected]

- name: Setup Node
uses: actions/[email protected]
Expand All @@ -21,11 +22,11 @@ jobs:
- name: Install dependencies
run: yarn

- name: Build
- name: Build
run: yarn build

- name: Lint
- name: Lint
run: yarn lint

- name: Test
- name: Test
run: yarn test

0 comments on commit 915c5ef

Please sign in to comment.