No description
- TypeScript 94%
- JavaScript 6%
| .forgejo/workflows | ||
| __tests__ | ||
| dist | ||
| src | ||
| .eslintignore | ||
| .eslintrc.json | ||
| .gitattributes | ||
| .gitignore | ||
| .prettierignore | ||
| .prettierrc.json | ||
| action.yml | ||
| jest.config.js | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
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:DeleteBranchpermission 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 withaws-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.