Skip to content

Commit

Permalink
Improve inventory cleanup on the first time setup workflow (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndpnt authored Mar 8, 2024
1 parent 7870781 commit 84bc6cc
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/first-time-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,20 @@ jobs:
- name: Update dependabot
run: |
sed -i "s|"OpenTermsArchive/demo"|"$REPOSITORY_OWNER/$REPOSITORY_NAME"|g" .github/dependabot.yml
- name: Update deployment inventory
- name: Cleanup deployment inventory
run: |
sed -i -z -e "s|hosts:\n\([[:blank:]]*\).*:\n|hosts:\n\1$PLACEHOLDER:\n|g" deployment/inventory.yml &&
sed -i "s|ansible_user: .*|ansible_user: $PLACEHOLDER|g" deployment/inventory.yml &&
sed -i "s|ed25519_fingerprint: .*|ed25519_fingerprint: $PLACEHOLDER|g" deployment/inventory.yml
content="all:
hosts:
$PLACEHOLDER:
ansible_user: $PLACEHOLDER
ed25519_fingerprint: $PLACEHOLDER
ota_engine_declarations_branch: $PLACEHOLDER
ota_engine_github_bot_private_key: $PLACEHOLDER
ota_engine_github_token: $PLACEHOLDER
ota_engine_smtp_password: $PLACEHOLDER"
echo "$content" > deployment/inventory.yml

- name: Update config
run: |
Expand Down

0 comments on commit 84bc6cc

Please sign in to comment.