aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/.github/workflows/run.yml
blob: fca2b033e80c175b26a2f4b7bcc3643e178c4254 (plain) (tree)
1
2
3
4
5
6
7
8
9



                    




                                      






                          
                                 








                                                                   
                              


                                                   

                                 
                              
                                                              
name: Run

on:
  workflow_dispatch:
    inputs:
      hosts:
        description: Inventory pattern
        required: false
        default: all

jobs:
  run:
    name: Run
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Set up WireGuard
        uses: egor-tensin/setup-wireguard@v1
        with:
          endpoint: '${{ secrets.ENDPOINT }}'
          endpoint_public_key: '${{ secrets.ENDPOINT_PUBLIC_KEY }}'
          ips: '${{ secrets.IPS }}'
          allowed_ips: '${{ secrets.ALLOWED_IPS }}'
          private_key: '${{ secrets.WG_PRIVATE_KEY }}'
          preshared_key: '${{ secrets.WG_PRESHARED_KEY }}'
      - name: Set up ssh-agent
        uses: webfactory/ssh-agent@v0.5.3
        with:
          ssh-private-key: '${{ secrets.SSH_KEY }}'
      - name: Install collections
        run: make deps
      - name: Run Ansible play
        run: make run limit='${{ github.event.inputs.hosts }}'