-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (39 loc) · 1.45 KB
/
debian-repo-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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