Skip to content

Merge pull request #1 from step-security/staging #1

Merge pull request #1 from step-security/staging

Merge pull request #1 from step-security/staging #1

Workflow file for this run

name: example
on:
push:
branches:
- main
jobs:
job:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v1
- name: Get DynamoDB Item
id: config
uses: step-security/dynamodb-actions@v1
env:
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
operation: get
region: us-east-1
table: dynamodb-actions-test
key: |
{ key: "foo" }
consistent: false
- name: Print item
run: |
echo '${{ steps.config.outputs.item }}'
- name: Print specific field using built-in function
run: |
echo '${{ fromJson(steps.config.outputs.item).commit }}'
- name: Print specific field using jq
run: |
jq '.commit' <<< '${{ steps.config.outputs.item }}'
- name: Delete DynamoDB Item
uses: step-security/dynamodb-actions@v1
env:
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
operation: delete
region: us-east-1
table: dynamodb-actions-test
key: |
{ key: "foo" }
- name: Put DynamoDB Item (JSON input)
uses: step-security/dynamodb-actions@v1
env:
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
operation: put
region: us-east-1
table: dynamodb-actions-test
item: |
{
key: "foo",
commit: "${{ github.sha }}",
value: "wow",
awesome: true,
stars: 12345
}
- name: Put DynamoDB Item (File Input)
uses: step-security/dynamodb-actions@v1
env:
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
operation: put
region: us-east-1
table: dynamodb-actions-test
file: fixtures/item.json
- name: BatchPut DynamoDB Item (JSON input)
uses: step-security/dynamodb-actions@v1
env:
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
operation: batch-put
region: us-east-1
table: dynamodb-actions-test
items: |
[{
key: "foo",
commit: "${{ github.sha }}",
value: "wow",
awesome: true,
stars: 12345
}, {
key: "bar",
value: "baz"
}]
- name: BatchPut DynamoDB Item (File Input)
uses: step-security/dynamodb-actions@v1
env:
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
operation: batch-put
region: us-east-1
table: dynamodb-actions-test
files: fixtures/*.json