Update to use docker.io for images
This commit is contained in:
parent
25cb5b9dba
commit
a06e2858fa
3 changed files with 7 additions and 22 deletions
|
@ -9,12 +9,6 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
|
||||||
# Use the github container registry
|
|
||||||
REGISTRY: ghcr.io
|
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
# Run the tests scripts
|
# Run the tests scripts
|
||||||
|
@ -41,12 +35,6 @@ jobs:
|
||||||
build-and-push-images:
|
build-and-push-images:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
needs: test
|
needs: test
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
attestations: write
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
@ -55,9 +43,8 @@ jobs:
|
||||||
- name: Log in to the Container registry
|
- name: Log in to the Container registry
|
||||||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
username: ${{ github.actor }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
password: ${{ secrets.GH_PAT }}
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
@ -66,7 +53,7 @@ jobs:
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: mdiluz/matchy
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=tag
|
type=ref,event=tag
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
|
|
|
@ -7,8 +7,6 @@ Matchy is a Discord bot that groups up users for fun and vibes. Matchy can be in
|
||||||
|
|
||||||
Note: Matchy currently only allows owner-authorised users to trigger posts in channels.
|
Note: Matchy currently only allows owner-authorised users to trigger posts in channels.
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
Matchy supports a bunch of user, `matcher` and bot owner commands. `/` commands are available in any channel the bot has access to, and `$` commands are only available in DMs.
|
Matchy supports a bunch of user, `matcher` and bot owner commands. `/` commands are available in any channel the bot has access to, and `$` commands are only available in DMs.
|
||||||
|
|
||||||
|
@ -35,7 +33,7 @@ Development has been on on Linux so far, but running on Mac or Windows _should_
|
||||||
|
|
||||||
### Getting Started
|
### Getting Started
|
||||||
```bash
|
```bash
|
||||||
git clone git@github.com:mdiluz/matchy.git
|
git clone https://forge.mdiluz.io/mdiluz/matchy.git
|
||||||
cd matchy
|
cd matchy
|
||||||
python -m venv .venv
|
python -m venv .venv
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
|
@ -56,11 +54,11 @@ State is stored locally in a `.matchy/state.json` file. This will be created by
|
||||||
The `TOKEN` envar is required run the bot. It's recommended this is placed in a local `.env` file. To generate bot token for development see [this discord.py guide](https://discordpy.readthedocs.io/en/stable/discord.html).
|
The `TOKEN` envar is required run the bot. It's recommended this is placed in a local `.env` file. To generate bot token for development see [this discord.py guide](https://discordpy.readthedocs.io/en/stable/discord.html).
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
Docker and Compose configs are provided, with the latest release tagged as `ghcr.io/mdiluz/matchy:latest`. A location for persistent data is stil required so some persistent volume will need to be mapped into the container as `/usr/share/app/.matchy`.
|
Docker and Compose configs are provided, with the latest release tagged as `mdiluz/matchy:latest`. A location for persistent data is stil required so some persistent volume will need to be mapped into the container as `/usr/share/app/.matchy`.
|
||||||
|
|
||||||
An example for how to do this may look like this:
|
An example for how to do this may look like this:
|
||||||
```bash
|
```bash
|
||||||
docker run -v --env-file=.env ./.matchy:/usr/src/app/.matchy ghcr.io/mdiluz/matchy:latest
|
docker run -v --env-file=.env ./.matchy:/usr/src/app/.matchy mdiluz/matchy:latest
|
||||||
```
|
```
|
||||||
A [`docker-compose.yml`](docker-compose.yml) file is also provided that essentially performs the above when used with `docker compose up --exit-code-from matchy`. A `MATCHY_DATA` envar can be used in conjunction with compose to set a custom local path for the location of the data file.
|
A [`docker-compose.yml`](docker-compose.yml) file is also provided that essentially performs the above when used with `docker compose up --exit-code-from matchy`. A `MATCHY_DATA` envar can be used in conjunction with compose to set a custom local path for the location of the data file.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
services:
|
services:
|
||||||
matchy:
|
matchy:
|
||||||
image: ghcr.io/mdiluz/matchy:${MATCHY_TAG:-latest}
|
image: mdiluz/matchy:${MATCHY_TAG:-latest}
|
||||||
env_file: ".env"
|
env_file: ".env"
|
||||||
volumes:
|
volumes:
|
||||||
- ${MATCHY_DATA:-./.matchy}:/usr/src/app/.matchy
|
- ${MATCHY_DATA:-./.matchy}:/usr/src/app/.matchy
|
Loading…
Add table
Reference in a new issue