-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
36 lines (34 loc) · 941 Bytes
/
action.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
# Copyright (c) 2022 OpenFaaS Ltd
name: 'hetzner-dns-action'
description: 'Setup the internal DNS server for Hetzner.'
branding:
icon: 'arrow-right-circle'
color: 'gray-dark'
inputs:
dns:
description: 'The DNS Server for systemd.'
required: true
default: "185.12.64.1"
runs:
using: 'composite'
steps:
- name: Setup resolv.conf
shell: bash
id: setup-config
env:
DNS: ${{ inputs.dns }}
run: |
echo "[Resolve]" | sudo tee /etc/systemd/resolved.conf
echo "DNS=$DNS" | sudo tee -a /etc/systemd/resolved.conf
cat /etc/systemd/resolved.conf
- name: Reload DNS
shell: bash
id: reload-dns-config
run: |
sudo systemctl daemon-reload
sudo systemctl restart systemd-resolved.service
- name: Debug DNS settings
shell: bash
id: show-settings
run: |
systemd-resolve --status --no-pager