-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #148 from aserto-dev/upd/ci
update CI
- Loading branch information
Showing
2 changed files
with
17 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ jobs: | |
steps: | ||
- | ||
uses: actions/checkout@v4 | ||
|
||
- | ||
name: Read Configuration | ||
uses: hashicorp/vault-action@v3 | ||
|
@@ -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 }} |