Skip to content
Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
test Initial commit Oct 16, 2018
Brewfile Initial commit Oct 16, 2018
Dockerfile Initial commit Oct 16, 2018
LICENSE Initial commit Oct 16, 2018
Makefile Initial commit Oct 16, 2018
README.md Revert "Updated readme.md to "Migrate to YAML"" Oct 1, 2019
THIRD_PARTY_NOTICE.md Initial commit Oct 16, 2018
entrypoint.sh Initial commit Oct 16, 2018

README.md

GitHub Actions for AWS

This Action for AWS enables arbitrary actions for interacting with AWS services via the aws command-line client.

Usage

An example workflow for creating and publishing to Simple Notification Service (SNS) topic follows.

The example illustrates a pattern for consuming a previous action's output using jq, made possible since each aws Action's output is captured by default as JSON in $GITHUB_HOME/$GITHUB_ACTION.json:

workflow "Publish to SNS topic" {
  on = "push"
  resolves = ["Publish"]
}

action "Topic" {
  uses = "actions/aws/cli@master"
  args = "sns create-topic --name my-topic"
  secrets = ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY"]
}

action "Publish" {
  needs = ["Topic"]
  uses = "actions/aws/cli@master"
  args = "sns publish --topic-arn `jq .TopicArn /github/home/Topic.json --raw-output` --subject \"[$GITHUB_REPOSITORY] Code was pushed to $GITHUB_REF\" --message file://$GITHUB_EVENT_PATH"
  secrets = ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY"]
}

Secrets

  • AWS_ACCESS_KEY_IDRequired The AWS access key part of your credentials (more info)
  • AWS_SECRET_ACCESS_KEYRequired The AWS secret access key part of your credentials (more info)

Environment variables

All environment variables listed in the official documentation are supported.

The most common environment variables are:

  • AWS_DEFAULT_REGION- Optional The AWS region name, defaults to us-east-1 (more info)
  • AWS_DEFAULT_OUTPUT- Optional The CLI's output output format, defaults to json (more info)
  • AWS_CONFIG_FILE - Optional A path to an AWS config file, combined with $GITHUB_WORKSPACE this can reference files within the repo. For example ${GITHUB_WORKSPACE}/.aws/config will use the file at .aws/config within the repository as the AWS config file. Do not commit .aws/credentials to your repo, keep your secrets in the secrets api. No default is provided (more info)

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.

Container images built with this project include third party materials. See THIRD_PARTY_NOTICE.md for details.

You can’t perform that action at this time.