homelab/.gitea/workflows/deploy-containers.yml
Matthew McKinnon ee562f2a56
All checks were successful
Deploy / Prepare Build (push) Successful in 16s
chore: use custom container for building
2024-11-08 22:50:56 +10:00

33 lines
920 B
YAML

name: Deploy
on:
push:
branches:
- master
jobs:
deploy:
name: Prepare Build
runs-on: homelab
container: git.comprofix.com/mmckinnon/alpine-runner:latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Deploy containers
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_KNOWN_HOSTS }}" >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
eval $(ssh-agent -s)
ssh-add <(echo "${{ secrets.SSH_PRIVATE_KEY }}")
echo "HOST *" > ~/.ssh/config
echo "StrictHostKeyChecking no" >> ~/.ssh/config
echo "${{ secrets.ANSIBLE_VAULT_PASSWORD }}" > ~/.vault_password.txt
echo "nameserver 10.10.10.1" > /etc/resolv.conf
./.gitea/workflows/deploy.sh "${{ github.event.before }}" "${{ github.sha }}"