Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use assume-role with OIDC authenticate docs push to S3 #1721

Merged
merged 2 commits into from
Jul 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,30 @@ on:
sqlalchemy_oso_version:
description: "sqlalchemy oso release to build docs for"
default: "0.27.0" # sqlalchemy_oso_version

# Needed to get an AWS token
permissions:
contents: read # (default) needed for the actions/checkout task
id-token: write # Retrieve ID token for AWS OIDC authentication

jobs:
publish:
name: Publish docs
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_AWS_SECRET }}
AWS_REGION: "us-east-1"
PUBLISH_DOCS: 1
ALGOLIA_ADMIN_API_KEY: ${{ secrets.ALGOLIA_ADMIN_API_KEY }}
steps:
- uses: actions/checkout@v2

- name: configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: arn:aws:iam::145452666862:role/oso-docs-github-actions-role
role-duration-seconds: 900
aws-region: us-east-1

### Setup dependencies
- uses: actions/setup-python@v2
name: Install Python
Expand Down
Loading