diff --git a/.github/lock.yml b/.github/lock.yml new file mode 100644 index 00000000..ff4759f4 --- /dev/null +++ b/.github/lock.yml @@ -0,0 +1,38 @@ +# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app + +# Number of days of inactivity before a closed issue or pull request is locked +daysUntilLock: 365 + +# Skip issues and pull requests created before a given timestamp. Timestamp must +# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable +skipCreatedBefore: false + +# Issues and pull requests with these labels will be ignored. Set to `[]` to disable +exemptLabels: + - dependencies + +# Label to add before locking, such as `outdated`. Set to `false` to disable +lockLabel: false + +# Comment to post before locking. Set to `false` to disable +lockComment: > + This thread has been automatically locked since there has not been + any recent activity after it was closed. Please open a new issue for + related bugs. + +# Assign `resolved` as the reason for locking. Set to `false` to disable +setLockReason: true +# Limit to only `issues` or `pulls` +# only: issues + +# Optionally, specify configuration settings just for `issues` or `pulls` +# issues: +# exemptLabels: +# - help-wanted +# lockLabel: outdated + +# pulls: +# daysUntilLock: 30 + +# Repository to extend settings from +# _extends: repo \ No newline at end of file diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 00000000..d6308b94 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,45 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# Number of days of inactivity before an Issue or Pull Request becomes stale +daysUntilStale: 60 + +# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. +# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. +daysUntilClose: 7 + +# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable +exemptLabels: + - pinned + - security + - dependencies + - never-stale + - priority:high + - priority:medium + - enhancement + +# Label to use when marking as stale +staleLabel: stale + +# Comment to post when marking as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. + +# Comment to post when removing the stale label. +# unmarkComment: > +# Your comment here. + +# Comment to post when closing a stale Issue or Pull Request. +# closeComment: > +# Your comment here. + +# Limit to only `issues` or `pulls` +# only: issues + +# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': +pulls: + markComment: > + This pull request has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 649dc66f..b788325d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,14 +1,14 @@ -name: "Docker build image" +name: "Build" on: push: branches: - - 'main' + - "main" tags: - - 'v*' + - "v*" pull_request: branches: - - 'main' + - "main" workflow_dispatch: permissions: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..767885b7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,75 @@ +name: "Release" + +on: + workflow_dispatch: + +jobs: + semantic-release: + name: Tag and release latest version + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 20.x + - name: Install dependencies + run: yarn --frozen-lockfile + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx semantic-release --dry-run + + build-docker-image: + name: Build docker images + needs: semantic-release + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: | + ghcr.io/jorenn92/maintainerr + + - name: Log in to GitHub Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: get-npm-version + id: package-version + uses: martinbeentjes/npm-get-version-action@v1.3.1 + + - name: Build & Push docker images + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/jorenn92/maintainerr:${{ steps.package-version.outputs.current-version}} + ghcr.io/jorenn92/maintainerr:latest + # jorenn92/maintainerr:latest + # jorenn92/maintainerr:${{ steps.package-version.outputs.current-version}} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/run_jest_tests.yml b/.github/workflows/run_jest_tests.yml index 37df6313..4c8cff37 100644 --- a/.github/workflows/run_jest_tests.yml +++ b/.github/workflows/run_jest_tests.yml @@ -21,7 +21,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: "20.x" - + - name: Install dependencies run: yarn --frozen-lockfile diff --git a/README.md b/README.md index 76f3a43f..71fd1795 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,11 @@