diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 421fe5f..880d1f1 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,9 +1,13 @@ # Description Closes #issue -### Additional Notes +## Time Spent -### Tests +X hours and X minutes + +## Additional Notes + +## Tests - [ ] 🧠 Not needed - [ ] 👀 Eyeball - [ ] 🤖 Added tests diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f32f20a..c119d94 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,46 +7,25 @@ on: workflow_dispatch: jobs: - release: - name: Auto release + code-checks: + name: Code Checks runs-on: ubuntu-latest - outputs: - version: ${{ steps.changelog.outputs.version }} steps: - - uses: actions/checkout@v4 - #with: - # token: ${{ secrets.PAT }} - # fetch-depth: 0 + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.ref }} + - name: Set up Node uses: actions/setup-node@v4 with: node-version: '20' - - name: Conventional Changelog Update - uses: TriPSs/conventional-changelog-action@v5 - id: changelog - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - output-file: 'CHANGELOG.md' - skip-version-file: 'true' - skip-commit: 'true' - git-push: 'false' - skip-on-empty: 'false' - - name: Set new version - run: | - echo "::set-output name=version::${{ steps.changelog.outputs.version }}" - npm version minor - - name: Commit changes - uses: EndBug/add-and-commit@v9 - with: - author_name: Ci Bot - author_email: cibot@users.noreply.github.com - message: 'doc: updating package to ${{ steps.changelog.outputs.version }} [ci skip]' - add: '["packages.json","CHANGELOG.md"]' - - name: Create Release - uses: ncipollo/release-action@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag: ${{ steps.changelog.outputs.tag }} - name: ${{ steps.changelog.outputs.tag }} - body: ${{ steps.changelog.outputs.clean_changelog }} + - name: Clean and Install + run: npm ci + - name: Build + run: npm run build + - name: Lint + run: npm run lint + #- name: Unit tests + # run: npm run test diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index e1336d8..f10a034 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,21 +12,38 @@ jobs: name: Code Checks runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ github.event.pull_request.head.ref }} - - - name: Set up Node - uses: actions/setup-node@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + name: Set up Node with: node-version: '20' - name: Clean and Install run: npm ci - name: Build run: npm run build - #- name: Lint - # run: npm run lint + - name: Lint + run: npm run lint #- name: Unit tests # run: npm run test + + docker-build: + name: Build Docker image + runs-on: ubuntu-latest + needs: + - code-checks + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + name: Set up Docker Buildx + - uses: docker/login-action@v3 + name: Login to Docker Hub + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: rmcampos/tasknote:${{ github.event.number }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/README.md b/README.md index a9c7af8..86a4151 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # TaskNote -[![License](https://img.shields.io/github/license/username/repo.svg)](LICENSE) - -[![Build Status](https://github.com/ricardo-campos-org/react-typescript-todolist/actions/workflows/main.yml/badge.svg)] +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +![Build Status](https://github.com/ricardo-campos-org/react-typescript-todolist/actions/workflows/main.yml/badge.svg) ## 📋 Table of Contents diff --git a/tools.md b/tools.md new file mode 100644 index 0000000..e8f1956 --- /dev/null +++ b/tools.md @@ -0,0 +1,5 @@ +# Tools + +- **TaskNote:** https://tasknote.local +- **Docker Hub:** https://hub.docker.com/ +- **Time tracking:** https://track.toggl.com/timer