...
Code Block |
---|
# note that this change is not persistent across relabels chcon -R -t bin_t /home/username/actions-runner # this change preserves the context semanage fcontext -a -t bin_t "/home/username/actions-runner(/.*)" Note that you could probably skip the chronchcon command, run the semanage command, and then use restorecon to reapply the new changes. |
...
Install a runner on dev, and another on prod, using
--labels=develop
and--labels=main
or whatever. It is customary to match your branch names.Note: you should set up an ssh deploy key, and for the “first run,” you’ll need to clone your repo onto the system into your working-directory manually
Create two separate workflows in your repository, like this:
.github/workflows/autodeploy-develop.yml
Code Block name: autodeploy-develop on: push: branches: - develop jobs: autodeploy: runs-on: [ self-hosted, develop ] steps: - working-directory: /path/to/repository run: git pull
.github/workflows/autodeploy-main.yml
Code Block name: autodeploy-main on: push: branches: - main jobs: autodeploy: runs-on: [ self-hosted, main ] steps: - working-directory: /path/to/repository run: git pull