gha-oidc-patterns

Configure GitHub Actions OIDC authentication for AWS, Pulumi, and ESC.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/aitchwhy/dotfiles --skill gha-oidc-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gha-oidc-patterns
Source: https://github.com/aitchwhy/dotfiles/tree/main/config/agents/skills/gha-oidc-patterns
Command: npx skills add https://github.com/aitchwhy/dotfiles --skill gha-oidc-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Defines secure GitHub Actions OIDC patterns using official actions.

Core Features & Use Cases

  • Automate AWS/Pulumi/ESC auth via official actions
  • Avoid curl|sh anti-patterns
  • Role-based permissions and token usage

Quick Start

Use aws-actions/configure-aws-credentials@v4 etc.

Frequently Asked Questions about gha-oidc-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I authenticate GitHub Actions to AWS without using curl|sh scripts?

Use aws-actions/configure-aws-credentials@v4 with OIDC token exchange. This official action replaces curl|sh anti-patterns by leveraging GitHub's id-token write permission to establish a secure, identity-federated connection to AWS without storing long-lived credentials.

What is OIDC and why should I use it for GitHub Actions authentication?

OIDC (OpenID Connect) enables token-based identity federation between GitHub and cloud services. It eliminates the need for static secrets, provides role-based access control, and allows GitHub Actions to assume temporary credentials directly from your cloud provider using cryptographically signed tokens.

Can I use GitHub Actions OIDC to deploy to both AWS and Pulumi in the same workflow?

Yes. Official OIDC-enabled actions support coordinating AWS login, Pulumi Cloud ESC authentication, and ECR/ECS deployment in a single multi-step workflow. Each step exchanges the GitHub id-token for provider-specific credentials, minimizing secret handling across all deployment targets.

How do I load configuration from Pulumi Cloud ESC in a GitHub Actions workflow?

Use Pulumi's official OIDC action to authenticate to ESC, then reference its configuration outputs directly in subsequent workflow steps. This approach centralizes secrets and settings in ESC while GitHub Actions retrieves them on-demand during deployment without storing them as repository secrets.

What permissions do I need to enable OIDC token access in GitHub Actions?

Add `id-token: write` permission to your workflow's `permissions` block. This allows GitHub Actions to request and sign OIDC tokens from the GitHub OIDC provider, which your cloud provider then validates to issue temporary credentials for your job.

Does OIDC authentication work with container registries and ECS deployments?

Yes. Official actions support OIDC-based ECR login and ECS task execution. After authenticating via OIDC to AWS, subsequent steps can push images to ECR and deploy to ECS using the temporary credentials obtained through token exchange, all within a single secure workflow.