Skip to content

Commit

Permalink
Merge pull request #148 from aserto-dev/upd/ci
Browse files Browse the repository at this point in the history
update CI
  • Loading branch information
gertd authored Oct 28, 2024
2 parents 5e8b148 + 4a64686 commit 2f5a5b2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/scrape.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Read Configuration
uses: hashicorp/[email protected]
-
uses: actions/checkout@v4
-
name: Read Configuration
uses: hashicorp/vault-action@v3
id: vault
with:
url: https://vault.eng.aserto.com/
token: ${{ secrets.VAULT_TOKEN }}
secrets: |
kv/data/algolia "API_KEY" | API_KEY;
kv/data/algolia "APPLICATION_ID" | APPLICATION_ID;
- name: Run Algolia Scrape
-
name: Run Algolia Scrape
run: |
docker run --rm -e "APPLICATION_ID=${APPLICATION_ID}" -e API_KEY="${API_KEY}" -e "CONFIG=$(cat ./scripts/algolia-config.json)" algolia/docsearch-scraper
21 changes: 10 additions & 11 deletions .github/workflows/update_templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
steps:
-
uses: actions/checkout@v4

-
name: Read Configuration
uses: hashicorp/vault-action@v3
Expand All @@ -33,38 +32,38 @@ jobs:
secrets: |
kv/data/github "SSH_PRIVATE_KEY" | SSH_PRIVATE_KEY;
kv/data/github "READ_WRITE_TOKEN" | READ_WRITE_TOKEN;
- name: Setup git
-
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"
- name: Get topaz
-
name: Get topaz
uses: actions/checkout@v4
with:
repository: "aserto-dev/topaz"
ref: ${{ inputs.branch }}
path: "./topaz"
token: ${READ_WRITE_TOKEN}

- name: Copy assets
-
name: Copy assets
run: |
cp -r ./topaz/assets/* static/assets/templates/
rm static/assets/templates/*.gif
rm -rf ./topaz
- name: Commit changes
-
name: Commit changes
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
new_branch: ${{ env.PR_BRANCH }}
message: Update static topaz template assets

- name: Prepare PR
-
name: Prepare PR
run: gh pr create ${{ env.PR_DRAFT_FLAG }} -H ${{ env.PR_BRANCH }} -B main --title '${{ env.PR_TITLE }}' --body 'Created by Github action'
env:
GITHUB_TOKEN: ${{ steps.vault.outputs.READ_WRITE_TOKEN }}

0 comments on commit 2f5a5b2

Please sign in to comment.