-
Notifications
You must be signed in to change notification settings - Fork 109
52 lines (41 loc) · 1.6 KB
/
update-drivers-website.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
name: Update Drivers Website
on:
workflow_dispatch:
# Every two hours
schedule:
- cron: '0 */2 * * *'
jobs:
update-drivers-website:
runs-on: ubuntu-latest
env:
S3_DRIVERS_BUCKET: falco-distribution
S3_DRIVERS_KEY_PREFIX: driver
AWS_S3_REGION: eu-west-1
permissions:
id-token: write
contents: read
steps:
- name: Checkout test-infra
uses: actions/checkout@v3
- name: Setup Golang
uses: actions/setup-go@v3
with:
go-version: '^1.19'
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: "arn:aws:iam::292999226676:role/github_actions-test-infra-s3"
aws-region: ${{ env.AWS_S3_REGION }}
- name: Create output folder
run: mkdir /$RUNNER_TEMP/update-drivers-website
- name: Setup update-drivers-website helper
working-directory: tools/update-drivers-website
run: go build -v -o update-drivers-website ./updateDriversWebsite.go
- name: Build updated json
working-directory: tools/update-drivers-website
run: ./update-drivers-website "/$RUNNER_TEMP/update-drivers-website"
- name: Copy index.html
working-directory: tools/update-drivers-website
run: cp index.html /$RUNNER_TEMP/update-drivers-website
- name: Push updated files to s3 bucket
run: aws s3 cp "/$RUNNER_TEMP/update-drivers-website" s3://${{ env.S3_DRIVERS_BUCKET}}/${{ env.S3_DRIVERS_KEY_PREFIX }}/site --recursive --include "*.json" --include "index.html" --acl public-read