Skip to content

Commit

Permalink
first attempt on fixing permission issue on github actions builds
Browse files Browse the repository at this point in the history
  • Loading branch information
sirtoobii committed Nov 25, 2022
1 parent 01fa7db commit c56301c
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 34 deletions.
5 changes: 5 additions & 0 deletions .github/actions/build-release-action/make-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
set -ex
cd /github/workspace/

# Overriding $HOME to prevent permissions issues when running on github actions
mkdir -p /tmp/home
chmod 0777 /tmp/home
export HOME=/tmp/home

# workaround for debhelper bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897569
mkdir -p deb_build_home
ls | grep -v deb_build_home | xargs mv -t deb_build_home # move everything except deb_build_home
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
name: Build package defined in ${{ matrix.docker_file }} for tag ${{ matrix.image_version_tag }}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Run docker build
id: build_package
uses: ./.github/actions/build-release-action
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
paths-ignore:
- '**.md'
tags-ignore:
- '**'
pull_request:
paths-ignore:
- '**.md'
Expand Down Expand Up @@ -31,9 +33,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: CPAN Cache
Expand Down
58 changes: 28 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
WGwrangler
===========
Version: 0.2.0
Date: 2021-07-18
Version: 0.2.1
Date: 2022-11-25

WGwrangler is a web application to manage local Wireguard Configuration using
[wg-meta](https://metacpan.org/release/Wireguard-WGmeta) in its backend.

It comes complete with a classic "configure - make - install" setup.

Setup
-----
In your app source directory and start building.
Installation
------------

Download the current release distribution

```console
# Install os dependencies
Expand All @@ -25,30 +26,6 @@ hints on how to fix the situation if something is missing.

Any missing perl modules will be downloaded and built.

Development
-----------

While developing the application it is convenient to NOT have to install it
before runnning. You can actually serve the Qooxdoo source directly
using the built-in Mojo webserver.

```console
./bin/wgwrangler-source-mode.sh
```

You can now connect to the CallBackery app with your web browser.

If you need any additional perl modules, write their names into the PERL_MODULES
file and run ./bootstrap.

**Honored Environment Variables**

- `WGwrangler_NO_WG` If defined, we do not call any wg* command from code (e.g. to generate pub/private-keys)
- `WGwrangler_CONFIG` Use this variable to set the path to the main `wgwrangler.yaml` file, defaults to `etc/wgrangler.yaml`

Installation
------------

To install the application, just run

```console
Expand All @@ -62,7 +39,7 @@ cd $HOME/opt/wgwrangler/bin
./wgwrangler prefork
```

OS Preparation (Manual installation)
OS Preparation (after manual installation)
-------------

Since managing wireguard using its associated `wg*` commands requires root privileges we suggest the following
Expand Down Expand Up @@ -102,6 +79,27 @@ Currently supported ubuntu versions:
- 20.04 LTS
- 22.04 LTS

Development
-----------

While developing the application it is convenient to NOT have to install it
before runnning. You can actually serve the Qooxdoo source directly
using the built-in Mojo webserver.

```console
./bin/wgwrangler-source-mode.sh
```

You can now connect to the CallBackery app with your web browser.

If you need any additional perl modules, write their names into the PERL_MODULES
file and run ./bootstrap.

**Honored Environment Variables**

- `WGwrangler_NO_WG` If defined, we do not call any wg* command from code (e.g. to generate pub/private-keys)
- `WGwrangler_CONFIG` Use this variable to set the path to the main `wgwrangler.yaml` file, defaults to `etc/wgrangler.yaml`

Packaging
---------

Expand Down
7 changes: 6 additions & 1 deletion build_local.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/bin/bash

# Overriding $HOME to prevent permissions issues when running on github actions
mkdir -p /tmp/home
chmod 0777 /tmp/home
export HOME=/tmp/home

apt -y update && \
apt-get -y install apt-utils curl && \
curl https://deb.nodesource.com/setup_16.x | bash && \
curl https://deb.nodesource.com/setup_18.x | bash && \
apt-get -u update && \
apt-get -y install perl \
make \
Expand Down

0 comments on commit c56301c

Please sign in to comment.