Skip to content

Debian Repository Deploy #52

Debian Repository Deploy

Debian Repository Deploy #52

name: Debian Repository Deploy
on:
workflow_dispatch:
jobs:
push:
runs-on: ubuntu-latest
container:
image: debian:bookworm
steps:
- name: Install Dependencies
run: |
apt-get -y update
apt-get -y dist-upgrade
apt-get -y install curl unzip
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Deploy new version
env:
NOMAD_CACERT: operations/admin-ui-ca.crt
NOMAD_TOKEN: ${{ secrets.NOMAD_TOKEN_ATOR_NETWORK_DEPLOY }}
NOMAD_ADDR: ${{ secrets.NOMAD_DEPLOY_ADDR }}
CONSUL_CACERT: operations/admin-ui-ca.crt
CONSUL_HTTP_TOKEN: ${{ secrets.CONSUL_HTTP_TOKEN_ATOR_NETWORK_DEPLOY }}
CONSUL_ADDR: ${{ secrets.CONSUL_DEPLOY_ADDR }}
run: |
curl -L https://releases.hashicorp.com/levant/0.3.3/levant_0.3.3_linux_amd64.zip -o levant.zip
unzip levant.zip
./levant render \
-var="reprepro_sec=${{ secrets.DEBIAN_PRIVATE_KEY }}" \
-var="reprepro_pub=${{ secrets.DEBIAN_PUBLIC_KEY }}" \
-var="authorized_keys=${{ secrets.DEBIAN_AUTHORIZED_KEYS }}" \
-out="deploy.hcl" \
-log-level="warn" \
operations/anon-debian-repo.hcl
curl -L https://releases.hashicorp.com/nomad/1.6.3/nomad_1.6.3_linux_amd64.zip -o nomad.zip
unzip nomad.zip
./nomad job run deploy.hcl