No description
  • TypeScript 94%
  • JavaScript 6%
Find a file
Thibaut Cholley 5a2e448fda
Some checks failed
Self-test / Test deleting a non-existent branch (idempotent success) (push) Failing after 3s
Self-test / Test deleting a real branch (push) Failing after 3s
Check dist/ / Check committed dist/ is up to date (push) Successful in 28s
feat: initial release
2026-07-10 11:23:23 +02:00
.forgejo/workflows feat: initial release 2026-07-10 11:23:23 +02:00
__tests__ feat: initial release 2026-07-10 11:23:23 +02:00
dist feat: initial release 2026-07-10 11:23:23 +02:00
src feat: initial release 2026-07-10 11:23:23 +02:00
.eslintignore feat: initial release 2026-07-10 11:23:23 +02:00
.eslintrc.json feat: initial release 2026-07-10 11:23:23 +02:00
.gitattributes feat: initial release 2026-07-10 11:23:23 +02:00
.gitignore feat: initial release 2026-07-10 11:23:23 +02:00
.prettierignore feat: initial release 2026-07-10 11:23:23 +02:00
.prettierrc.json feat: initial release 2026-07-10 11:23:23 +02:00
action.yml feat: initial release 2026-07-10 11:23:23 +02:00
jest.config.js feat: initial release 2026-07-10 11:23:23 +02:00
LICENSE feat: initial release 2026-07-10 11:23:23 +02:00
package-lock.json feat: initial release 2026-07-10 11:23:23 +02:00
package.json feat: initial release 2026-07-10 11:23:23 +02:00
README.md feat: initial release 2026-07-10 11:23:23 +02:00
tsconfig.json feat: initial release 2026-07-10 11:23:23 +02:00

actions-amplify-delete-branch

Forgejo/GitHub action to delete a branch on an AWS Amplify app. Written in TypeScript using the AWS SDK for JavaScript v3, distributed as a Node.js action — no aws CLI required on the runner.

If the branch does not exist on the Amplify app, the action succeeds anyway (the desired end state — branch absent — is already reached) and reports deleted: "false".

Requirements

  • AWS credentials with amplify:DeleteBranch permission on the target app, available through the standard AWS SDK credential chain (environment variables, shared config, or an assumed role). Typically configured upstream in the workflow with aws-actions/configure-aws-credentials.

Usage

- name: Configure AWS credentials
  uses: aws-actions/configure-aws-credentials@v4
  with:
    aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
    aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    aws-region: eu-west-1

- name: Delete Amplify branch
  uses: forge.app-cp.fr/Elsie/actions-amplify-delete-branch@v1
  with:
    aws-region: eu-west-1
    app-id: d1234abcd5678
    branch-name: ${{ github.head_ref }}

Inputs

Name Required Description
aws-region yes AWS region of the Amplify app
app-id yes Amplify app ID
branch-name yes Name of the branch to delete on the Amplify app

Outputs

Name Description
deleted "true" if the branch was deleted, "false" if it did not exist
branch-name Name of the branch that was targeted
app-id Amplify app ID that was targeted

Development

# Install dependencies
npm install

# Run the test suite
npm test

# Lint and format
npm run lint
npm run format

# Build the bundle (must be committed)
npm run build

# Run everything before pushing
npm run all

The dist/ directory must be committed — Forgejo runners execute it directly without running npm install. The check-dist.yml workflow ensures the committed bundle is always in sync with the sources.

License

See LICENSE. Internal Elsie use only.