mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-22 21:23:02 +01:00
45 lines
1.6 KiB
YAML
45 lines
1.6 KiB
YAML
name: AUR key check
|
|
|
|
# Confirms the AUR accepts the release key (github-actions-hex-aur) by listing
|
|
# the account's packages. Dispatch from dev after adding or rotating the key.
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
check:
|
|
if: github.ref == 'refs/heads/dev'
|
|
runs-on: ubuntu-24.04
|
|
environment: release
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
ref: ${{ github.sha }}
|
|
sparse-checkout: /.github/release/
|
|
sparse-checkout-cone-mode: false
|
|
persist-credentials: false
|
|
# Step outputs only, for the one step that reads the key.
|
|
- id: aws
|
|
name: Configure AWS credentials
|
|
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
|
|
with:
|
|
role-to-assume: arn:aws:iam::604439173067:role/github/hex-release
|
|
role-session-name: hex-${{ github.run_id }}
|
|
role-duration-seconds: 900
|
|
aws-region: us-east-1
|
|
output-env-credentials: false
|
|
output-credentials: true
|
|
- name: List the AUR account's packages with the key
|
|
shell: bash
|
|
env:
|
|
AWS_ACCESS_KEY_ID: ${{ steps.aws.outputs.aws-access-key-id }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ steps.aws.outputs.aws-secret-access-key }}
|
|
AWS_SESSION_TOKEN: ${{ steps.aws.outputs.aws-session-token }}
|
|
run: |
|
|
bash .github/release/with-secrets.sh AUR_SSH_PRIVATE_KEY=shared/AUR_SSH_KEY \
|
|
-- bash .github/release/push-aur.sh check | tee -a "$GITHUB_STEP_SUMMARY"
|