tera-arise/arise

Generate Systemd unit files as part of Arise.Server.Daemon build

Closed this issue · 0 comments

alexrp commented

- name: Generate unit file
run: |
sed -e "s/ENVIRONMENT/${{ inputs.environment }}/g" -e "s/ROLE/${{ inputs.role }}/g" arised.service > arised-${{ inputs.role }}.service
working-directory: src/server/daemon
- name: Upload unit file
uses: appleboy/scp-action@v0.1.4
with:
host: ${{ inputs.environment }}.${{ inputs.role }}.tera-arise.io
fingerprint: ${{ secrets.SSH_FINGERPRINT }}
username: root
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: src/server/daemon/arised-${{ inputs.role }}.service
strip_components: 3
target: /etc/systemd/system

This is the only part of the workflow that litters untracked files in the source tree. We should generate these files as part of the regular build and grab them from the output directory.