diff options
| author | Egor Tensin <egor@tensin.name> | 2025-11-27 09:59:17 +0100 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2025-11-27 10:17:52 +0100 |
| commit | b9c0e1bcd39b56c8f1545a3a7c72a16bbeef51e9 (patch) | |
| tree | 6dc4685770cdd5c5b45ec29853b02af68cdb8011 /.github/workflows | |
| parent | workflows/main: disable runs on push (diff) | |
| download | maintenance-b9c0e1bcd39b56c8f1545a3a7c72a16bbeef51e9.tar.gz maintenance-b9c0e1bcd39b56c8f1545a3a7c72a16bbeef51e9.zip | |
workflows: add infra-metal
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/infra-metal.yml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/.github/workflows/infra-metal.yml b/.github/workflows/infra-metal.yml new file mode 100644 index 0000000..ff2632d --- /dev/null +++ b/.github/workflows/infra-metal.yml @@ -0,0 +1,51 @@ +name: infra-metal + +on: + workflow_call: + inputs: + limit: + description: 'Ansible hosts' + type: string + default: all + required: false + workflow_dispatch: + inputs: + limit: + description: 'Ansible hosts' + type: string + default: all + required: false + +jobs: + maintenance: + runs-on: ubuntu-latest + steps: + - name: Set up WireGuard + uses: egor-tensin/setup-wireguard@v1 + with: + endpoint: '${{ secrets.WG_ENDPOINT }}' + endpoint_public_key: '${{ secrets.WG_ENDPOINT_PUBLIC }}' + ips: '${{ secrets.WG_IPS }}' + allowed_ips: '${{ secrets.WG_ALLOWED_IPS }}' + private_key: '${{ secrets.WG_PRIVATE }}' + preshared_key: '${{ secrets.WG_PRESHARED }}' + - name: Configure SSH + run: | + mkdir -p ~/.ssh + cat > ~/.ssh/config <<'EOF' + StrictHostKeyChecking no + EOF + - name: Set up ssh-agent + uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: '${{ secrets.SSH_KEY }}' + - name: Checkout + run: | + git clone -q ssh://git@bitbucket.org/egor-tensin/infra-metal.git + - name: Configure git + run: | + git config --global user.name 'Egor Tensin' + git config --global user.email 'egor@tensin.name' + - name: Run maintenance + run: | + make -C infra-metal maintenance 'LIMIT=${{ inputs.limit }}' |
