mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +01:00
Merge e4e53e0a1b into 5b15544bdd
This commit is contained in:
commit
fc12b0b78f
1 changed files with 39 additions and 0 deletions
39
.github/workflows/test-release-oidc.yml
vendored
Normal file
39
.github/workflows/test-release-oidc.yml
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
name: Test Release OIDC
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
oidc-check:
|
||||
runs-on: ubuntu-latest
|
||||
environment: releases
|
||||
steps:
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
with:
|
||||
role-to-assume: "arn:aws:iam::080433136561:role/nix-release"
|
||||
role-session-name: nix-release-oidc-test-${{ github.run_id }}
|
||||
aws-region: eu-west-1
|
||||
|
||||
- name: Verify AWS identity
|
||||
run: aws sts get-caller-identity
|
||||
|
||||
- name: Confirm access to release bucket
|
||||
run: |
|
||||
set -euo pipefail
|
||||
KEY=$(aws s3api list-objects-v2 \
|
||||
--bucket nix-releases \
|
||||
--prefix nix/nix-2.31.2/install \
|
||||
--query 'Contents[0].Key' \
|
||||
--output text)
|
||||
if [[ "$KEY" = "None" || -z "$KEY" ]]; then
|
||||
echo "No objects found under nix/ prefix in nix-releases bucket" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Found object $KEY"
|
||||
aws s3 cp "s3://nix-releases/$KEY" - >/dev/null
|
||||
Loading…
Add table
Add a link
Reference in a new issue