Skip to content

Commit

Permalink
feat: migrate everything to sm
Browse files Browse the repository at this point in the history
  • Loading branch information
joryirving committed Jan 24, 2024
1 parent de82136 commit cb6b1b5
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 25 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/bulk-merge-prs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,21 @@
name: Bulk Merge PRs
runs-on: ubuntu-latest
steps:
- name: Get Secrets
uses: bitwarden/sm-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
33fe0505-5ef3-4d91-8053-b101004a4947 > BOT_USERNAME
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
app-id: "${{ env.BOT_APP_ID }}"
private-key: "${{ env.BOT_APP_PRIVATE_KEY }}"

- name: Checkout
uses: actions/checkout@v4
Expand All @@ -37,7 +46,7 @@
GITHUB_TOKEN: "${{ steps.app-token.outputs.token }}"
run: |
args=()
args+=(--app ${{ secrets.BOT_USERNAME }})
args+=(--app ${{ env.BOT_USERNAME }})
args+=(--state open)
if [ "${{ github.event.inputs.labels }}" != "any" ]; then
IFS=',' read -ra labels <<< "${{ github.event.inputs.labels }}"
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/flux-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@ jobs:
outputs:
matrix: ${{ steps.changed-clusters.outputs.all_changed_and_modified_files }}
steps:
- name: Get Secrets
uses: bitwarden/sm-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
app-id: "${{ env.BOT_APP_ID }}"
private-key: "${{ env.BOT_APP_PRIVATE_KEY }}"

- name: Checkout Default Branch
uses: actions/checkout@v4
Expand Down Expand Up @@ -61,8 +69,8 @@ jobs:
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
app-id: "${{ env.BOT_APP_ID }}"
private-key: "${{ env.BOT_APP_PRIVATE_KEY }}"

- name: Checkout
uses: actions/checkout@v4
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/flux-hr-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ jobs:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
1c493889-1e30-4156-a937-b10100433300 > KUBECONFIG
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
app-id: "${{ env.BOT_APP_ID }}"
private-key: "${{ env.BOT_APP_PRIVATE_KEY }}"

- name: Checkout
uses: actions/checkout@v4
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/flux-image-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@ jobs:
outputs:
matrix: ${{ steps.changed-clusters.outputs.all_changed_and_modified_files }}
steps:
- name: Get Secrets
uses: bitwarden/sm-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
app-id: "${{ env.BOT_APP_ID }}"
private-key: "${{ env.BOT_APP_PRIVATE_KEY }}"

- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -62,8 +70,8 @@ jobs:
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
app-id: "${{ env.BOT_APP_ID }}"
private-key: "${{ env.BOT_APP_PRIVATE_KEY }}"

- name: Setup Homebrew
uses: Homebrew/actions/setup-homebrew@master
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/flux-ks-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ jobs:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
1c493889-1e30-4156-a937-b10100433300 > KUBECONFIG
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
app-id: "${{ env.BOT_APP_ID }}"
private-key: "${{ env.BOT_APP_PRIVATE_KEY }}"

- name: Checkout
uses: actions/checkout@v4
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/label-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,20 @@ jobs:
name: Label Sync
runs-on: ubuntu-latest
steps:
- name: Get Secrets
uses: bitwarden/sm-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
app-id: "${{ env.BOT_APP_ID }}"
private-key: "${{ env.BOT_APP_PRIVATE_KEY }}"

- name: Checkout
uses: actions/checkout@v4
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,20 @@ jobs:
contents: read
pull-requests: write
steps:
- name: Get Secrets
uses: bitwarden/sm-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
app-id: "${{ env.BOT_APP_ID }}"
private-key: "${{ env.BOT_APP_PRIVATE_KEY }}"

- name: Labeler
uses: actions/labeler@v5
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/lychee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,20 @@ jobs:
name: Lychee
runs-on: ubuntu-latest
steps:
- name: Get Secrets
uses: bitwarden/sm-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
app-id: "${{ env.BOT_APP_ID }}"
private-key: "${{ env.BOT_APP_PRIVATE_KEY }}"

- name: Checkout
uses: actions/checkout@v4
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/publish-terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,20 @@ jobs:
contents: read
packages: write
steps:
- name: Get Secrets
uses: bitwarden/sm-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
app-id: "${{ env.BOT_APP_ID }}"
private-key: "${{ env.BOT_APP_PRIVATE_KEY }}"

- name: Checkout
uses: actions/checkout@v4
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,20 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- name: Get Secrets
uses: bitwarden/sm-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
e062dcb9-8cd7-471e-b9be-b10100497102 > BOT_APP_ID
5856238d-3fae-4a0f-9847-b1010049f697 > BOT_APP_PRIVATE_KEY
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
app-id: "${{ env.BOT_APP_ID }}"
private-key: "${{ env.BOT_APP_PRIVATE_KEY }}"

- name: Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit cb6b1b5

Please sign in to comment.