Skip to content

Commit

Permalink
Add superlinter
Browse files Browse the repository at this point in the history
This PR includes updates needed to make the linting pass.

Closes #133
  • Loading branch information
SeanTAllen committed Sep 16, 2023
1 parent 04c49db commit a167ead
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 31 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/docker-image-builds.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: PR

on: pull_request

concurrency:
group: pr-${{ github.ref }}
cancel-in-progress: true

jobs:
superlinter:
name: Lint bash, docker, markdown, and yaml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Lint codebase
uses: docker://github/super-linter:v3.8.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: true
VALIDATE_BASH: true
VALIDATE_DOCKERFILE: true
VALIDATE_MD: true
VALIDATE_YAML: true

validate-docker-image-builds:
name: Validate Docker image builds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Docker build
run: "docker build --pull docker/."
30 changes: 15 additions & 15 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## From Ubuntu 18.04

```
```bash
# let's update first
sudo apt-get update

Expand All @@ -29,7 +29,7 @@ See https://docs.docker.com/engine/install/ubuntu/

It boils down to:

```
```bash
# cleanup old stuff
sudo apt-get remove docker docker-engine docker.io containerd runc

Expand All @@ -49,15 +49,15 @@ sudo apt-get install -y docker-ce docker-ce-cli containerd.io

### Webserver setup

```
```bash
add-apt-repository ppa:certbot/certbot
apt-get update
apt-get install -y nginx python-certbot-nginx
```

Create /etc/nginx/sites-enabled/playground.ponylang.io.conf

```
```text
server {
listen 80 default_server;
listen [::]:80 default_server;
Expand All @@ -70,7 +70,7 @@ server {
}
```

```
```bash
rm /etc/nginx/sites-enabled/default
ln -sf /etc/nginx/sites-available/playground.ponylang.io.conf /etc/nginx/sites-enabled/playground.ponylang.io.conf

Expand All @@ -79,27 +79,27 @@ nginx -t && nginx -s reload

### SSL setup

```
```bash
certbot --nginx -d playground.ponylang.io -m [email protected]
```

crontab -e

```
```text
0 12 * * * /usr/bin/certbot renew --quiet
05 12 * * * systemctl restart playground
```

### Start docker

```
```bash
systemctl enable docker
systemctl start docker
```

### Install rust

```
```bash
curl https://sh.rustup.rs | sh
```

Expand All @@ -108,15 +108,15 @@ select `1` from prompt

As this file might be outdated, make sure the version here corresponds to the version listed in the `rust-toolchain` file of this repo.

```
```bash
source /root/.profile
rustup install 1.60.0
rustup default 1.60.0
```

### Build playground image

```
```bash
git clone https://github.com/ponylang/pony-playground.git
cd pony-playground
docker build docker --pull -t ponylang-playpen
Expand All @@ -131,15 +131,15 @@ Should ONLY be the token, not "user:token"

### Build it

```
```bash
cargo build --release --bin playpen
```

### Create Systemd Unit

Put the following in the file `/etc/systemd/system/playground.service`, put in the generated GITHUB_TOKEN from above:

```
```text
[Unit]
Description=Pony Playground Systemd Service Unit
Requires=docker.service
Expand All @@ -156,14 +156,14 @@ WantedBy=multi-user.target

### Enable and Run it

```
```bash
systemctl enable playground
systemctl start playground
```

STDOUT and STDERR both go the journal. If you want to investigate logs, use:

```
```bash
journalctl -u playground ...
```

0 comments on commit a167ead

Please sign in to comment.