diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml deleted file mode 100644 index 02d7898be..000000000 --- a/.github/workflows/build-pull-request.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Build pull request - -on: - pull_request: - types: ['opened', 'synchronize'] - -jobs: - build-pull-request: - name: Build pull request - runs-on: ubuntu-latest - env: - PR_NUMBER: ${{github.event.number}} - steps: - - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup node - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version-file: '.node-version' - package-manager-cache: false - - name: Install dependencies - run: npm ci - - name: Build app - env: - NODE_OPTIONS: '--max_old_space_size=4096' - run: npm run build - - name: Upload artifact - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: preview - path: dist - retention-days: 1 - - name: Save pr number - run: echo ${PR_NUMBER} > ./pr.txt - - name: Upload pr number - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: pr - path: ./pr.txt - retention-days: 1 diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml deleted file mode 100644 index 42eab7ef6..000000000 --- a/.github/workflows/cla.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: 'CLA Assistant' -on: - issue_comment: - types: [created] - pull_request_target: - types: [opened, closed, synchronize] - -jobs: - CLAssistant: - runs-on: ubuntu-latest - steps: - - name: 'CLA Assistant' - if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' - # Beta Release - uses: cla-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # the below token should have repo scope and must be manually added by you in the repository's secret - PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_PAT }} - with: - path-to-signatures: 'signatures.json' - path-to-document: 'https://github.com/cinnyapp/cla/blob/main/cla.md' # e.g. a CLA or a DCO document - # branch should not be protected - branch: 'main' - allowlist: ajbura,bot* - - #below are the optional inputs - If the optional inputs are not given, then default values will be taken - remote-organization-name: cinnyapp - remote-repository-name: cla - #create-file-commit-message: 'For example: Creating file for storing CLA Signatures' - #signed-commit-message: 'For example: $contributorName has signed the CLA in #$pullRequestNo' - #custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign' - #custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA' - #custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.' - #lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true) - #use-dco-flag: true - If you are using DCO instead of CLA diff --git a/.github/workflows/deploy-pull-request.yml b/.github/workflows/deploy-pull-request.yml deleted file mode 100644 index 05aa8cabc..000000000 --- a/.github/workflows/deploy-pull-request.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Deploy PR to Netlify -run-name: 'Deploy PR to Netlify (${{ github.event.workflow_run.head_branch }})' - -on: - workflow_run: - workflows: ['Build pull request'] - types: [completed] - -jobs: - deploy-pull-request: - name: Deploy pull request - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - if: ${{ github.event.workflow_run.conclusion == 'success' }} - steps: - - name: Download pr number - uses: dawidd6/action-download-artifact@b6e2e70617bc3265edd6dab6c906732b2f1ae151 # v21 - with: - workflow: ${{ github.event.workflow.id }} - run_id: ${{ github.event.workflow_run.id }} - name: pr - - name: Validate and output pr number - id: pr - run: | - PR_ID=$(> "${GITHUB_OUTPUT}" - - name: Download artifact - uses: dawidd6/action-download-artifact@b6e2e70617bc3265edd6dab6c906732b2f1ae151 # v21 - with: - workflow: ${{ github.event.workflow.id }} - run_id: ${{ github.event.workflow_run.id }} - name: preview - path: dist - - name: Deploy to Netlify - id: netlify - uses: nwtgck/actions-netlify@4cbaf4c08f1a7bfa537d6113472ef4424e4eb654 # v3.0.0 - with: - publish-dir: dist - deploy-message: 'Deploy PR ${{ steps.pr.outputs.id }}' - alias: ${{ steps.pr.outputs.id }} - # These don't work because we're in workflow_run - enable-pull-request-comment: false - enable-commit-comment: false - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN_PR }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_PR_CINNY }} - timeout-minutes: 1 - - name: Comment preview on PR - uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b #v3.0.1 - env: - github-token: ${{ secrets.GITHUB_TOKEN }} - with: - pr-number: ${{ steps.pr.outputs.id }} - comment-tag: ${{ steps.pr.outputs.id }} - message: | - Preview: ${{ steps.netlify.outputs.deploy-url }} - ⚠️ Exercise caution. Use test accounts. ⚠️ diff --git a/.github/workflows/docker-pr.yml b/.github/workflows/docker-pr.yml deleted file mode 100644 index b4025085c..000000000 --- a/.github/workflows/docker-pr.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: 'Docker check' - -on: - pull_request: - paths: - - 'Dockerfile' - - '.github/workflows/docker-pr.yml' - - '.github/workflows/prod-deploy.yml' - -jobs: - docker-build: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0 - - - name: Login to Docker Hub #Do not update this action from a outside PR - if: github.event.pull_request.head.repo.fork == false - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - continue-on-error: true - - - name: Login to the Github Container registry #Do not update this action from a outside PR - if: github.event.pull_request.head.repo.fork == false - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - continue-on-error: true - - - name: Extract metadata (tags, labels) for Docker, GHCR - id: meta - uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0 - with: - images: | - ajbura/cinny - ghcr.io/${{ github.repository }} - - - name: Build Docker image (no push) - uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0 - with: - context: . - platforms: linux/amd64 - push: false - load: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - - name: Show Docker images - run: docker images diff --git a/.github/workflows/lockfile.yml b/.github/workflows/lockfile.yml deleted file mode 100644 index 559bccaef..000000000 --- a/.github/workflows/lockfile.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: NPM Lockfile Changes - -on: - pull_request: - paths: - - 'package-lock.json' - -jobs: - lockfile_changes: - runs-on: ubuntu-latest - # Permission overwrite is required for Dependabot PRs, see "Common issues" below. - permissions: - contents: read - pull-requests: write - steps: - - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: NPM Lockfile Changes - uses: codepunkt/npm-lockfile-changes@b40543471c36394409466fdb277a73a0856d7891 # v1.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - # Optional inputs, can be deleted safely if you are happy with default values. - collapsibleThreshold: 25 - failOnDowngrade: false - path: package-lock.json - updateComment: true diff --git a/.github/workflows/netlify-dev.yml b/.github/workflows/netlify-dev.yml deleted file mode 100644 index 686019e06..000000000 --- a/.github/workflows/netlify-dev.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Deploy to Netlify (dev) - -on: - push: - branches: - - dev - -jobs: - deploy-to-netlify: - name: Deploy to Netlify - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup node - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version-file: '.node-version' - package-manager-cache: false - - name: Install dependencies - run: npm ci - - name: Build app - env: - NODE_OPTIONS: '--max_old_space_size=4096' - run: npm run build - - name: Deploy to Netlify - uses: nwtgck/actions-netlify@4cbaf4c08f1a7bfa537d6113472ef4424e4eb654 # v3.0.0 - with: - publish-dir: dist - deploy-message: 'Dev deploy ${{ github.sha }}' - enable-commit-comment: false - github-token: ${{ secrets.GITHUB_TOKEN }} - production-deploy: true - github-deployment-environment: nightly - github-deployment-description: 'Nightly deployment on each commit to dev branch' - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_DEV }} - timeout-minutes: 1 diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml deleted file mode 100644 index a52ee8e6d..000000000 --- a/.github/workflows/pr-title.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Check PR title - -on: - pull_request_target: - types: - - opened - - edited - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/prod-deploy.yml b/.github/workflows/prod-deploy.yml deleted file mode 100644 index a07bfc74a..000000000 --- a/.github/workflows/prod-deploy.yml +++ /dev/null @@ -1,99 +0,0 @@ -name: Production deploy - -on: - release: - types: [published] - -jobs: - deploy-and-tarball: - name: Netlify deploy and tarball - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup node - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version-file: '.node-version' - package-manager-cache: false - - name: Install dependencies - run: npm ci - - name: Build app - env: - NODE_OPTIONS: '--max_old_space_size=4096' - run: npm run build - - name: Deploy to Netlify - uses: nwtgck/actions-netlify@4cbaf4c08f1a7bfa537d6113472ef4424e4eb654 # v3.0.0 - with: - publish-dir: dist - deploy-message: 'Prod deploy ${{ github.ref_name }}' - enable-commit-comment: false - github-token: ${{ secrets.GITHUB_TOKEN }} - production-deploy: true - github-deployment-environment: stable - github-deployment-description: 'Stable deployment on each release' - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_APP }} - timeout-minutes: 1 - - name: Get version from tag - id: vars - run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - - name: Create tar.gz - run: tar -czvf cinny-${{ steps.vars.outputs.tag }}.tar.gz dist - - name: Sign tar.gz - run: | - echo '${{ secrets.GNUPG_KEY }}' | gpg --batch --import - # Sadly a few lines in the private key match a few lines in the public key, - # As a result just --export --armor gives us a few lines replaced with *** - # making it useless for importing the signing key. Instead, we dump it as - # non-armored and hex-encode it so that its printable. - echo "PGP Signing key, in raw PGP format in hex. Import with cat ... | xxd -r -p - | gpg --import" - gpg --export | xxd -p - echo '${{ secrets.GNUPG_PASSPHRASE }}' | gpg --batch --yes --pinentry-mode loopback --passphrase-fd 0 --armor --detach-sign cinny-${{ steps.vars.outputs.tag }}.tar.gz - - name: Upload tagged release - uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0 - with: - files: | - cinny-${{ steps.vars.outputs.tag }}.tar.gz - cinny-${{ steps.vars.outputs.tag }}.tar.gz.asc - - publish-image: - name: Push Docker image to Docker Hub, GHCR - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Set up QEMU - uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0 - - name: Login to Docker Hub #Do not update this action from a outside PR - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Login to the Github Container registry #Do not update this action from a outside PR - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker, GHCR - id: meta - uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0 - with: - images: | - ${{ secrets.DOCKER_USERNAME }}/cinny - ghcr.io/${{ github.repository }} - - name: Build and push Docker image - uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0 - with: - context: . - platforms: linux/amd64,linux/arm64 - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }}