Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bootstrap update workflow #434

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/update-bootstrap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Update Bootstrap nodes

on:
release:
types: [released]

jobs:
update-bootstrap-nodes:
name: Update Bootstrap nodes
runs-on: ubuntu-latest
strategy:
matrix:
include:
- environment: bootstrap-tnet-mainnet
limit: tnet,mainnet
- environmnt: bootstrap-devqa
limit: devqa
max-parallel: 1
steps:
- uses: actions/checkout@v4
- name: Get Release Version from Cargo.toml
id: cargo_version
run: |
VERSION=$(grep '^version' Cargo.toml | sed -E 's/version = "(.*)"/\1/')
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Checkout Ansible Playbook
uses: actions/checkout@v4
with:
repository: ceramicstudio/simpledeploy
path: simpledeploy
- name: Add SSH key
run: |
echo "${{ secrets.ANSIBLE_SSH_KEY }}" > ~/.ssh/ansible_ssh_key
chmod 600 ~/.ssh/ansible_ssh_key
- name: Install Ansible requirements
working-directory: simpledeploy/ansible
run: |
sudo pip3 install -r pip.requirements.txt
- name: Update ${{ matrix.environment }} Bootstrap nodes
working-directory: simpledeploy/ansible
env:
ANSIBLE_PRIVATE_KEY_FILE: ~/.ssh/ansible_ssh_key
ANSIBLE_REMOTE_USER: ansible
run: |
ansible-playbook -i inventory/bootstrap.yml \
--extra-vars "rust_ceramic_version=${{ env.VERSION }}" \
--limit ${{ matrix.limit }} \
playbooks/bootstrap-update.yaml
Loading