Skip to content

Commit

Permalink
add configuration with defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
aiqs4 committed Feb 21, 2020
1 parent 32422e1 commit c2a7f52
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
16 changes: 16 additions & 0 deletions snap/hooks/configuration
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -ex

user="$(snapctl get user)"
group="$(snapctl get group)"

user=${user:-root}
group=${group:-root}

chown $user.$group -R /var/lib/gh-runner/${SNAP_NAME}/_work
chown $user.$group -R /var/lib/gh-runner/${SNAP_NAME}/_diag
chown $user.$group /var/lib/gh-runner/${SNAP_NAME}/.runner
chown $user.$group /var/lib/gh-runner/${SNAP_NAME}/.credentials
chown $user.$group /var/lib/gh-runner/${SNAP_NAME}/.credentials_rsaparams
chown $user.$group /var/lib/gh-runner/${SNAP_NAME}/svc.sh
14 changes: 7 additions & 7 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ apps:

parts:
externals:
plugin: dump
source: .
organize:
env: .env
path: .path
gh-conf: usr/bin/gh-conf
gh-run: usr/bin/gh-run
plugin: dump
source: .
organize:
env: .env
path: .path
gh-conf: usr/bin/gh-conf
gh-run: usr/bin/gh-run

runner:
source: https://github.com/actions/runner.git
Expand Down

0 comments on commit c2a7f52

Please sign in to comment.