Skip to content

Commit

Permalink
feat(ci): convert e2e & nightly to op
Browse files Browse the repository at this point in the history
  • Loading branch information
PoisonPhang committed Aug 13, 2024
1 parent 504b471 commit 23cefc9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/e2e-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,26 @@ on:
workflow_dispatch:

jobs:
load-secrets:
runs-on: ubuntu-latest
outputs:
union-org-pat: ${{ steps.op-load-secret.UNION_ORG_PAT }}
nixbuild-token: ${{ steps.op-load-secret.NIXBUILD_TOKEN }}
steps:
- name: Load Secrets
id: op-load-secret
uses: 1password/load-secrets-action@v2
with:
export-env: false
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
UNION_ORG_PAT: op://ci/union-org-pat/pat
NIXBUILD_TOKEN: op://ci/nixbuild-token/token

build:
needs: load-secrets
uses: ./.github/workflows/e2e.yml
secrets:
nixbuild_token: ${{ secrets.NIXBUILD_TOKEN }}
nixbuild_token: ${{ needs.load-secrets.outputs.nixbuild-token }}
github_token: ${{ secrets.GITHUB_TOKEN }}
org_token: ${{ secrets.UNION_ORG_PAT }}
org_token: ${{ needs.load-secrets.outputs.union-org-pat }}
21 changes: 19 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,29 @@ on:
- cron: '0 4 * * *'

jobs:
load-secrets:
runs-on: ubuntu-latest
outputs:
union-org-pat: ${{ steps.op-load-secret.UNION_ORG_PAT }}
nixbuild-token: ${{ steps.op-load-secret.NIXBUILD_TOKEN }}
steps:
- name: Load Secrets
id: op-load-secret
uses: 1password/load-secrets-action@v2
with:
export-env: false
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
UNION_ORG_PAT: op://ci/union-org-pat/pat
NIXBUILD_TOKEN: op://ci/nixbuild-token/token

build:
needs: load-secrets
uses: ./.github/workflows/e2e.yml
secrets:
nixbuild_token: ${{ secrets.nixbuild_token }}
nixbuild_token: ${{ needs.load-secrets.outputs.nixbuild-token }}
github_token: ${{ secrets.GITHUB_TOKEN }}
org_token: ${{ secrets.UNION_ORG_PAT }}
org_token: ${{ needs.load-secrets.outputs.union-org-pat }}

create-issue:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 23cefc9

Please sign in to comment.