fix: Correctly ingest logs #95
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
env: | |
BINARY_NAME: devx-logs-linux | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.17" | |
- name: Run tests | |
working-directory: ec2 | |
run: go test . | |
upload: | |
runs-on: ubuntu-latest | |
needs: [test] | |
# See https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token | |
permissions: | |
# required by aws-actions/configure-aws-credentials | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.17" | |
- name: Build | |
working-directory: ec2 | |
run: | | |
GOOS=linux GOARCH=arm64 go build -o $BINARY_NAME-arm64 main.go | |
GOOS=linux GOARCH=amd64 go build -o $BINARY_NAME-amd64 main.go | |
- uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} | |
aws-region: eu-west-1 | |
- uses: guardian/actions-riff-raff@v2 | |
with: | |
app: devx-logs | |
contentDirectories: | | |
devx-logs: | |
- ec2/${{ env.BINARY_NAME }}-arm64 | |
- ec2/${{ env.BINARY_NAME }}-amd64 | |
config: | | |
stacks: | |
- deploy | |
regions: | |
- eu-west-1 | |
allowedStages: | |
- CODE | |
- PROD | |
deployments: | |
devx-logs: | |
type: aws-s3 | |
parameters: | |
bucket: amigo-data | |
cacheControl: private | |
publicReadAcl: false |