Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/hypermod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Hypermod

on:
workflow_dispatch:
inputs:
deploymentId:
description: "The deployment ID containing instructions to apply on a repository"
deploymentKey:
description: "The deployment key to authenticate the request"
jobs:
receive_hypermod_event:
permissions:
contents: write
pull-requests: write
actions: read
checks: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Run Hypermod CLI
uses: hypermod-io/action@v1
with:
deploymentId: ${{ inputs.deploymentId }}
deploymentKey: ${{ inputs.deploymentKey }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm run test
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Hypermod Transformer Action
Github Action for progressing remote transformation requests triggered from the Hypermod App.

Github Action for progressing batch transformation requests triggered remotely from the Hypermod App.

## Running locally
https://blog.harshcasper.com/debugging-github-actions-workflows-effectively
The action accepts a single argument `deploymentId` & `deploymentKey`, which it will use to access specific transform instructions from the Hypermod App.
19 changes: 6 additions & 13 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
name: Hypermod
description: A GitHub action to perform transformations triggered via the Hypermod App
description: A GitHub action to perform batch transformations triggered via the Hypermod App
runs:
using: "node20"
main: "dist/index.js"
inputs:
eventType:
description: "Event type dispatched from the Hypermod app"
type: choice
required: true
options:
- transform
- check
transformIds:
description: "Transform Ids to run (comma separated)"
deploymentId:
description: "The ID of the deployment to run"
type: string
required: true
directories:
description: "Directories Ids to run (comma separated)"
deploymentKey:
description: "The deployment secret key which authorizes the action to run the deployment"
type: string
required: true
outputs:
pullRequestNumbers:
description: "The pull request number that was created or updated (comma separated)"
description: "The pull request number(s) created or updated (comma separated)"
branding:
icon: "star"
color: "black"
8 changes: 4 additions & 4 deletions dist/index.js

Large diffs are not rendered by default.

Loading