-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
56 lines (45 loc) · 1.52 KB
/
Copy pathaction.yml
File metadata and controls
56 lines (45 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
name: 'Test deploy-to-s3-bucket action'
description: 'Runs validation agains the deploy-to-s3-bucket action'
inputs:
aws-account-id:
description: 'The AWS Account id'
required: true
runs:
using: 'composite'
steps:
- name: 'Setup Homebrew'
uses: Homebrew/actions/setup-homebrew@master
- name: 'Install BATS and jq'
shell: bash
run: brew install bats-core jq
- name: 'Checkout'
uses: actions/checkout@v7
- name: 'Use local actions'
uses: ./.github/actions/use-local-actions
- name: 'Get unique id'
id: id
shell: bash
run: echo "id=$(date '+%s')" >> $GITHUB_OUTPUT
- name: 'Create archive file'
shell: bash
run: tar -zcvf archive.tgz -C ${{ github.action_path }}/assets .
- name: 'Configure AWS Credentials'
uses: aws-actions/configure-aws-credentials@v6
with:
aws-region: 'us-east-1'
role-to-assume: arn:aws:iam::${{ inputs.aws-account-id }}:role/github-actions-tests
- name: 'Run deploy-to-s3-bucket action'
uses: ./actions/deploy-to-s3-bucket
with:
pattern: 'archive.tgz'
s3-bucket: shopsmart-github-actions-tests
s3-bucket-path: ${{ steps.id.outputs.id }}
cache-control: max-age=3600
- name: 'Validate'
shell: bash
run: bats --tap --verbose-run ${{ github.action_path }}/deploy-to-s3-bucket.bats
env:
S3_BUCKET: shopsmart-github-actions-tests
S3_BUCKET_PATH: ${{ steps.id.outputs.id }}
CACHE_CONTROL: max-age=3600