Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: cleanup for images #28

Merged
merged 3 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Cleaner

on:
workflow_dispatch:
schedule:
- cron: "0 0 12,25 * *"

jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- uses: actions/delete-package-versions@v5
with:
package-name: goblin
package-type: container
min-versions-to-keep: 10
ignore-versions: '(v?\d+\.\d+\.\d+|latest|(nightly[-]\w+))'
11 changes: 5 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,12 @@ simpler fashion**

### Existing Image

The repository builds a nightly image that you can use directly if you don't
wish to tweak anything.
The repository builds and publishes a `latest` and a semver tagged version on each release. You can use that if you do not wish to tweak or change anything in the original source code and build structure

```sh
$ docker run -p "3000:3000" ghcr.io/barelyhuman/goblin:nightly
$ docker run -p "3000:3000" ghcr.io/barelyhuman/goblin:latest
# change the domain to whatever you are using for it
$ docker run -e "GOBLIN_ORIGIN_URL=example.com" -p "3000:3000" ghcr.io/barelyhuman/goblin:nightly
$ docker run -e "GOBLIN_ORIGIN_URL=example.com" -p "3000:3000" ghcr.io/barelyhuman/goblin:latest
```

#### Using Docker
Expand Down Expand Up @@ -155,8 +154,8 @@ ORIGIN_URL=
```sh
# www/.env

# the same url as ORIGIN_URL but added again because vite needs it in the repo
VITE_GOBLIN_ORIGIN_URL=
# the same url as ORIGIN_URL but added again because the static build needs it in the repo
GOBLIN_ORIGIN_URL=
```

running the `build.sh` should handle building with the needed env files and
Expand Down
Loading