Skip to content

Commit

Permalink
Integrate organization GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
dincho committed Jan 23, 2025
1 parent de7cfa0 commit ee17a84
Show file tree
Hide file tree
Showing 8 changed files with 138 additions and 58 deletions.
20 changes: 0 additions & 20 deletions .github/dependabot.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/_validate-npm.yml
Original file line number Diff line number Diff line change
@@ -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
38 changes: 0 additions & 38 deletions .github/workflows/code-check.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: integration

on:
push:
branches: [main]

jobs:
publish:
uses: aeternity/github-actions/.github/workflows/[email protected]
secrets: inherit
with:
BUILD_ARGS: REVISION=${{ github.sha }}
deploy:
uses: aeternity/github-actions/.github/workflows/[email protected]
needs: [publish]
secrets: inherit
with:
DEPLOY_ENV: stg
DEPLOY_APP: aepp-hyperchains-initiator
DEPLOY_VERSION: main
DEPLOY_SUBDOMAIN: 'hyperchains-initiator'
25 changes: 25 additions & 0 deletions .github/workflows/pull-request-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: pull-request-cleanup

on:
pull_request:
branches: [main]
types: [closed]

jobs:
rollback:
uses: aeternity/github-actions/.github/workflows/[email protected]
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/[email protected]
secrets: inherit
with:
TAG: 'pr-${{ github.event.number }}'
cleanup:
uses: aeternity/github-actions/.github/workflows/[email protected]
needs: [delete-tag]
secrets: inherit
23 changes: 23 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
secrets: inherit
with:
BUILD_ARGS: REVISION=${{ github.sha }}
deploy:
uses: aeternity/github-actions/.github/workflows/[email protected]
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'
18 changes: 18 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: release

on:
push:
tags: [v*]

jobs:
publish:
uses: aeternity/github-actions/.github/workflows/[email protected]
secrets: inherit
with:
BUILD_ARGS: REVISION=${{ github.sha }}
deploy:
uses: aeternity/github-actions/.github/workflows/[email protected]
needs: [publish]
secrets: inherit
with:
DEPLOY_ENV: prd
DEPLOY_APP: aepp-hyperchains-initiator
DEPLOY_TAG: ${{ github.ref_name }}
DEPLOY_SUBDOMAIN: 'hyperchains-initiator'

0 comments on commit ee17a84

Please sign in to comment.