fix: chown /etc/opencloud e /var/lib/opencloud antes do opencloud init #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install shellcheck | |
| run: sudo apt-get update -qq && sudo apt-get install -y -qq shellcheck | |
| - name: shellcheck | |
| run: | | |
| shellcheck \ | |
| conf.d/downloads \ | |
| conf.d/main \ | |
| overlay/usr/local/bin/turnkey-oc \ | |
| overlay/usr/lib/inithooks/firstboot.d/20regen-opencloud-secrets \ | |
| overlay/usr/lib/inithooks/firstboot.d/40opencloud | |
| - name: python syntax | |
| run: | | |
| python3 -c "import ast, sys; ast.parse(open(sys.argv[1]).read())" overlay/usr/lib/inithooks/bin/opencloud.py | |
| - name: no compiled artifacts in overlay | |
| run: | | |
| if find overlay \( -name '__pycache__' -o -name '*.pyc' \) | grep -q .; then | |
| echo "compiled python artifacts found in overlay/" >&2 | |
| exit 1 | |
| fi | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install bats | |
| run: sudo apt-get update -qq && sudo apt-get install -y -qq bats | |
| - name: bats | |
| run: sudo bats tests # root needed for the update-path tests |