forked from chetan/invalidate-cloudfront-action
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (92 loc) · 2.79 KB
/
tests.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: "Test Suite"
permissions:
id-token: write
contents: read
on:
workflow_dispatch:
inputs:
branch:
description: "Branch to run tests on"
required: false
default: "test"
jobs:
tests:
name: "Test ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-18.04, windows-latest, macos-latest]
steps:
- name: checkout
uses: actions/checkout@v2
with:
ref: "${{ inputs.branch }}"
- name: print versions
shell: bash
run: |
uname
uname -a
aws --version
jq --version
jq --help
- name: invalidate PATHS
uses: ./
env:
DEBUG: "1"
PATHS: /robots* /index.html
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
AWS_REGION: "us-east-1"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: create path files
shell: bash
run: |
cat << EOF > paths1.txt
/robots.txt
/*.xml
EOF
cat << EOF > paths2.txt
/robots.txt /*.xml
EOF
- name: invalidate PATHS_FROM 1
uses: ./
env:
DEBUG: "1"
PATHS_FROM: paths1.txt
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
AWS_REGION: "us-east-1"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: invalidate PATHS_FROM 2
uses: ./
env:
DEBUG: "1"
PATHS_FROM: paths2.txt
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
AWS_REGION: "us-east-1"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: configure aws credentials (access key)
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: "us-east-1"
- name: invalidate PATHS using aws creds
uses: ./
env:
DEBUG: "1"
PATHS: /robots* /index.html
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
- name: configure aws credentials (oidc)
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-session-name: TestSessionName
aws-region: "us-east-1"
- name: invalidate PATHS using oidc creds
uses: ./
env:
DEBUG: "1"
PATHS: /robots* /index.html
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}