| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
A collection of custom GitHub actions used throughout Exercism.
The configlet reusable workflow can be used to easily run configlet commands. Currently, two commands are supported:
The commands can be enabled or disabled via two boolean inputs:
| Name | Description | Type | Required | Default |
|---|---|---|---|---|
| lint | Run configlet lint | boolean | No | true |
| fmt | Run configlet fmt | boolean | No | false |
name: Configlet
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
configlet:
uses: exercism/github-actions/.github/workflows/configlet.yml@mainNote that the worklow will take care of everything, including checking out the code. We've also explicitly set the permissions to just reading contents.
name: Configlet
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
configlet:
uses: exercism/github-actions/.github/workflows/configlet.yml@main
with:
fmt: truename: Configlet
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
configlet:
uses: exercism/github-actions/.github/workflows/configlet.yml@main
with:
lint: false
fmt: trueThe docker-build-push-image reusable workflow can be used to easily build and push a repository's Docker image to AWS ECR and/or Docker Hub.
Which registry you want the built image to be pushed to can be enabled or disabled via two boolean inputs:
| Name | Description | Type | Required | Default |
|---|---|---|---|---|
| aws_ecr | Push to AWS ECR | boolean | False | true |
| docker_hub | Push to Docker Hub | boolean | False | true |
These are the secrets that the workflow requires:
| Name | Description | Type | Required |
|---|---|---|---|
| AWS_ACCOUNT_ID | The AWS account ID used to determine the ECR registry | string | Yes |
| AWS_REGION | The AWS region used to determine the ECR registry | string | Yes |
| AWS_ECR_ACCESS_KEY_ID | The access key ID used to log into AWS ECR | string | Yes |
| AWS_ECR_SECRET_ACCESS_KEY | The secret access key ID used to log into AWS ECR | string | Yes |
| DOCKERHUB_USERNAME | The username used to log into Docker Hub | string | Yes |
| DOCKERHUB_PASSWORD | The password used to log into Docker Hub | string | Yes |
name: Build and Push Docker image
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-push-image:
uses: exercism/github-actions/.github/workflows/docker-build-push-image.yml@main
secrets:
AWS_ACCOUNT_ID: ${{secrets.AWS_ACCOUNT_ID}}
AWS_REGION: ${{secrets.AWS_REGION}}
AWS_ECR_ACCESS_KEY_ID: ${{secrets.AWS_ECR_ACCESS_KEY_ID}}
AWS_ECR_SECRET_ACCESS_KEY: ${{secrets.AWS_ECR_SECRET_ACCESS_KEY}}
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}name: Build and Push Docker image
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-push-image:
uses: exercism/github-actions/.github/workflows/docker-build-push-image.yml@main
with:
docker_hub: false
secrets:
AWS_ACCOUNT_ID: ${{secrets.AWS_ACCOUNT_ID}}
AWS_REGION: ${{secrets.AWS_REGION}}
AWS_ECR_ACCESS_KEY_ID: ${{secrets.AWS_ECR_ACCESS_KEY_ID}}
AWS_ECR_SECRET_ACCESS_KEY: ${{secrets.AWS_ECR_SECRET_ACCESS_KEY}}
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}name: Build and Push Docker image
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-push-image:
uses: exercism/github-actions/.github/workflows/docker-build-push-image.yml@main
with:
aws_ecr: false
secrets:
AWS_ACCOUNT_ID: ${{secrets.AWS_ACCOUNT_ID}}
AWS_REGION: ${{secrets.AWS_REGION}}
AWS_ECR_ACCESS_KEY_ID: ${{secrets.AWS_ECR_ACCESS_KEY_ID}}
AWS_ECR_SECRET_ACCESS_KEY: ${{secrets.AWS_ECR_SECRET_ACCESS_KEY}}
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}The deploy-lambda reusable workflow can be used to easily deploy a lambda function to AWS ECR.
There are the input parameters:
| Name | Description | Type | Required |
|---|---|---|---|
| function_name | The name of the function to deploy | string | True |
These are the secrets that the workflow requires:
| Name | Description | Type | Required |
|---|---|---|---|
| AWS_ACCOUNT_ID | The AWS account ID used to determine the ECR registry | string | Yes |
| AWS_REGION | The AWS region used to determine the ECR registry | string | Yes |
| AWS_ECR_ACCESS_KEY_ID | The access key ID used to log into AWS ECR | string | Yes |
| AWS_ECR_SECRET_ACCESS_KEY | The secret access key ID used to log into AWS ECR | string | Yes |
name: Push Docker images to DockerHub and ECR and deploy to AWS
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-push-image:
uses: exercism/github-actions/.github/workflows/docker-build-push-image.yml@main
secrets:
AWS_ACCOUNT_ID: ${{secrets.AWS_ACCOUNT_ID}}
AWS_REGION: ${{secrets.AWS_REGION}}
AWS_ECR_ACCESS_KEY_ID: ${{secrets.AWS_LAMBDA_ACCESS_KEY_ID}}
AWS_ECR_SECRET_ACCESS_KEY: ${{secrets.AWS_LAMBDA_SECRET_ACCESS_KEY}}
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
deploy-lambda:
uses: exercism/github-actions/.github/workflows/deploy-lambda.yml@main
needs: build-and-push-image
with:
function_name: snippet_extractor
secrets:
AWS_ACCOUNT_ID: ${{secrets.AWS_ACCOUNT_ID}}
AWS_REGION: ${{secrets.AWS_REGION}}
AWS_ECR_ACCESS_KEY_ID: ${{secrets.AWS_LAMBDA_ACCESS_KEY_ID}}
AWS_ECR_SECRET_ACCESS_KEY: ${{secrets.AWS_LAMBDA_SECRET_ACCESS_KEY}}Note that the deploy lambda workflow depends on the Docker image already having been pushed to ECR, which is done in the build-and-push-image job.
The labels reusable workflow can be used to sync the repository's labels via its .github/labels.yml file.
name: Tools
on:
push:
branches:
- main
paths:
- .github/labels.yml
- .github/workflows/sync-labels.yml
workflow_dispatch:
schedule:
- cron: 0 0 1 * * # First day of each month
permissions:
issues: write
jobs:
sync-labels:
uses: exercism/github-actions/.github/workflows/labels.yml@mainThe sorted reusable workflow checks if the practice exercises on a track are sorted.
Some extra fields are added to the exercise data for sorting.
The workflow takes a single input, ordering (required), that determines how sorting works. The ordering input is passed to sort_by() and must be a valid JQ path expression.
Some valid ordering values:
name: Exercise order
on:
pull_request:
branches:
- main
permissions:
contents: read
jobs:
call-gha-workflow:
name: check
uses: exercism/github-actions/.github/workflows/sorted.yml@main
with:
ordering: ".bucket, .slug"The link-checker reusable workflow calls Lychee and creates an issue if any problematic links are reported.
None.
To run this on a monthly schedule, in your track repo add this workflow:
name: Check Links
on:
workflow_dispatch:
schedule:
- cron: 0 0 15 * * # 15th day of each month
jobs:
call-gha-workflow:
uses: exercism/github-actions/.github/workflow/link-checker.yml@main| Back | FazBrowse Home | New Git URL |