Skip to content

Commit

Permalink
Merge pull request #4 from aserto-dev/gh-codegen-app
Browse files Browse the repository at this point in the history
CI checks out the repo using a GH app token
  • Loading branch information
ronenh authored Oct 30, 2024
2 parents b54c659 + 0e2d3a9 commit 57e3e7c
Showing 1 changed file with 13 additions and 22 deletions.
35 changes: 13 additions & 22 deletions .github/workflows/update.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: update

on:
Expand All @@ -11,41 +12,31 @@ on:
required: false

env:
VAULT_ADDR: https://vault.eng.aserto.com/
VAULT_ADDR: https://vault.eng.aserto.com/
GO_VERSION: "1.23"
GO_LANGCI_LINT_VERSION: "v1.61.0"
GO_LANGCI_LINT_VERSION: "v1.61.0"
CONSOLE_VERSION: ${{ inputs.version }}

jobs:
update:
runs-on: ubuntu-latest
steps:
-
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.CODEGEN_APP_ID }}
private-key: ${{ secrets.CODEGEN_APP_KEY }}
-
name: Checkout
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
-
name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
-
name: Read Configuration
uses: hashicorp/vault-action@v3
id: vault
with:
url: https://vault.eng.aserto.com/
token: ${{ secrets.VAULT_TOKEN }}
secrets: |
kv/data/github "SSH_PRIVATE_KEY" | SSH_PRIVATE_KEY;
kv/data/github "READ_WRITE_TOKEN" | READ_WRITE_TOKEN;
-
name: Setup git
run: |
mkdir -p $HOME/.ssh
umask 0077 && echo -e "${SSH_PRIVATE_KEY}" > $HOME/.ssh/id_rsa
ssh-keyscan github.com >> $HOME/.ssh/known_hosts
git config --global url."[email protected]:".insteadOf https://github.com/
git config --global user.email "[email protected]"
git config --global user.name "Aserto Bot"
go-version: ${{ env.GO_VERSION }}
-
name: Update static files
run: |
Expand Down

0 comments on commit 57e3e7c

Please sign in to comment.