diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 57a53bf..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,20 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for more information: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates -# https://containers.dev/guide/dependabot - -version: 2 -updates: - - package-ecosystem: 'devcontainers' - directory: '/' - schedule: - interval: weekly - - package-ecosystem: 'docker' - directory: '/' - schedule: - interval: weekly - - package-ecosystem: 'npm' - directory: '/' - schedule: - interval: weekly diff --git a/.github/workflows/_validate-npm.yml b/.github/workflows/_validate-npm.yml new file mode 100644 index 0000000..1e18f6e --- /dev/null +++ b/.github/workflows/_validate-npm.yml @@ -0,0 +1,30 @@ +on: + workflow_call: + +jobs: + lint: + runs-on: ubuntu-latest + name: ๐Ÿงน ESLint, ๐Ÿท๏ธ Typecheck, ๐Ÿ’… Prettier, ๐Ÿ—๏ธ Build + steps: + - name: ๐Ÿ”„ Checkout code + uses: actions/checkout@v4 + + - name: ๐ŸŒฑ Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: ๐Ÿ“ฅ Install dependencies + run: npm ci + + - name: ๐Ÿงน ESLint + run: npm run lint + + - name: ๐Ÿท๏ธ Typecheck + run: npm run typecheck + + - name: ๐Ÿ’… Prettier check + run: npm run format:check + + - name: ๐Ÿ—๏ธ Build + run: npm run build diff --git a/.github/workflows/code-check.yml b/.github/workflows/code-check.yml deleted file mode 100644 index 7b8edb5..0000000 --- a/.github/workflows/code-check.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Code Check -on: - push: - branches: - - main - pull_request: {} - -concurrency: - group: ${{ github.job }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - code-check: - name: ๐Ÿงน ESLint, ๐Ÿท๏ธ Typecheck, ๐Ÿ’… Prettier, ๐Ÿ—๏ธ Build - runs-on: ubuntu-latest - steps: - - name: ๐Ÿ”„ Checkout code - uses: actions/checkout@v4 - - - name: ๐ŸŒฑ Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - - - name: ๐Ÿ“ฅ Install dependencies - run: npm ci - - - name: ๐Ÿงน ESLint - run: npm run lint - - - name: ๐Ÿท๏ธ Typecheck - run: npm run typecheck - - - name: ๐Ÿ’… Prettier check - run: npm run format:check - - - name: ๐Ÿ—๏ธ Build - run: npm run build diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 0000000..3ec607e --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,21 @@ +name: integration + +on: + push: + branches: [main] + +jobs: + publish: + uses: aeternity/github-actions/.github/workflows/_publish-ecr.yml@v2.3.1 + secrets: inherit + with: + BUILD_ARGS: REVISION=${{ github.sha }} + deploy: + uses: aeternity/github-actions/.github/workflows/_deploy-gitops.yml@v2.3.1 + needs: [publish] + secrets: inherit + with: + DEPLOY_ENV: stg + DEPLOY_APP: aepp-hyperchains-initiator + DEPLOY_VERSION: main + DEPLOY_SUBDOMAIN: 'hyperchains-initiator' diff --git a/.github/workflows/pull-request-cleanup.yml b/.github/workflows/pull-request-cleanup.yml new file mode 100644 index 0000000..d871f5d --- /dev/null +++ b/.github/workflows/pull-request-cleanup.yml @@ -0,0 +1,25 @@ +name: pull-request-cleanup + +on: + pull_request: + branches: [main] + types: [closed] + +jobs: + rollback: + uses: aeternity/github-actions/.github/workflows/_rollback-gitops.yml@v2.3.1 + secrets: inherit + with: + DEPLOY_ENV: stg + DEPLOY_APP: aepp-hyperchains-initiator + DEPLOY_VERSION: 'pr-${{ github.event.number }}' + DEPLOY_SUBDOMAIN: 'pr-${{ github.event.number }}-hyperchains-initiator' + delete-tag: + uses: aeternity/github-actions/.github/workflows/_delete-tag-ecr.yml@v2.3.1 + secrets: inherit + with: + TAG: 'pr-${{ github.event.number }}' + cleanup: + uses: aeternity/github-actions/.github/workflows/_cleanup-ecr.yml@v2.3.1 + needs: [delete-tag] + secrets: inherit diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..f3b58e2 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,23 @@ +name: pull-request + +on: + pull_request: + branches: [master] + +jobs: + validate: + uses: ./.github/workflows/_validate-npm.yml + publish: + uses: aeternity/github-actions/.github/workflows/_publish-ecr.yml@v2.3.1 + secrets: inherit + with: + BUILD_ARGS: REVISION=${{ github.sha }} + deploy: + uses: aeternity/github-actions/.github/workflows/_deploy-gitops.yml@v2.3.1 + needs: [publish] + secrets: inherit + with: + DEPLOY_ENV: stg + DEPLOY_APP: aepp-hyperchains-initiator + DEPLOY_VERSION: 'pr-${{ github.event.number }}' + DEPLOY_SUBDOMAIN: 'pr-${{ github.event.number }}-hyperchains-initiator' diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..3da805d --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,18 @@ +name: release-please + +on: + push: + branches: [main] + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + token: ${{ secrets.BOT_GITHUB_TOKEN }} + release-type: node diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..57a94cd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,21 @@ +name: release + +on: + push: + tags: [v*] + +jobs: + publish: + uses: aeternity/github-actions/.github/workflows/_publish-ecr.yml@v2.3.1 + secrets: inherit + with: + BUILD_ARGS: REVISION=${{ github.sha }} + deploy: + uses: aeternity/github-actions/.github/workflows/_deploy-gitops.yml@v2.3.1 + needs: [publish] + secrets: inherit + with: + DEPLOY_ENV: prd + DEPLOY_APP: aepp-hyperchains-initiator + DEPLOY_TAG: ${{ github.ref_name }} + DEPLOY_SUBDOMAIN: 'hyperchains-initiator'