From 964886a5adb2ebf7c48fb74e0cb2de0c8241addf Mon Sep 17 00:00:00 2001 From: Noelle Wang <73260931+No767@users.noreply.github.com> Date: Wed, 14 Aug 2024 09:13:58 -0700 Subject: [PATCH] Fix Docker inconsistencies (#182) --- .github/workflows/docker.yml | 12 +++++++----- .github/workflows/release.yml | 7 ++----- docker/Dockerfile | 4 ++-- docker/docker-compose.prod.yml | 2 +- docker/docker-compose.yml | 2 +- envs/docker.env | 12 ------------ 6 files changed, 13 insertions(+), 26 deletions(-) delete mode 100644 envs/docker.env diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c02b220..f5b2008 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,12 +3,15 @@ name: Docker on: push: branches: [main] - tags: - - 'v*' + tags: ["v*"] jobs: Build-and-Push: runs-on: ubuntu-latest + + # We want to filter out dependabot and pre-commit + # automated pushes to main + if: ${{ github.actor != 'dependabot[bot]'}} && ${{ github.actor != 'pre-commit-ci[bot]'}} steps: - name: Checkout uses: actions/checkout@v4 @@ -44,7 +47,6 @@ jobs: context: . file: ./docker/Dockerfile push: true - cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/rodhaj:bot-build-cache - cache-to: type=registry,mode=max,ref=ghcr.io/${{ github.repository_owner }}/rodhaj:bot-build-cache - tags: ${{ steps.meta.outputs.tags }} + cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/rodhaj-build-cache:bot + cache-to: type=registry,mode=max,ref=ghcr.io/${{ github.repository_owner }}/rodhaj-build-cache:bot labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c99bcb..221e966 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,11 +31,8 @@ jobs: Release: - permissions: - contents: write - needs: Bundle - runs-on: ubuntu-latest + needs: Bundle if: contains(github.event.head_commit.message, '#major') || contains(github.event.head_commit.message, '#minor') || contains(github.event.head_commit.message, '#patch') steps: - uses: actions/checkout@v4 @@ -52,7 +49,7 @@ jobs: uses: anothrNick/github-tag-action@1.67.0 id: tag_version env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} WITH_V: true RELEASE_BRANCHES: main diff --git a/docker/Dockerfile b/docker/Dockerfile index c7c204e..0dc5c35 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -7,10 +7,10 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y --no-install-recommends \ - tini \ bash \ - netcat-traditional \ git \ + netcat-traditional \ + tini \ && apt-get clean WORKDIR /rodhaj diff --git a/docker/docker-compose.prod.yml b/docker/docker-compose.prod.yml index 2d3d345..b15fd8a 100644 --- a/docker/docker-compose.prod.yml +++ b/docker/docker-compose.prod.yml @@ -3,7 +3,7 @@ name: rodhaj_prod services: rodhaj: container_name: rodhaj - image: ghcr.io/transprogrammer/rodhaj:latest + image: ghcr.io/transprogrammer/rodhaj:edge volumes: # Do not edit the next line. If you want to change the path of the configuration file, please edit the CONFIG_LOCATION variable - ${CONFIG_LOCATION}:/rodhaj/bot/config.yml diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index e8edb3f..fb03f86 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -3,7 +3,7 @@ name: rodhaj services: rodhaj: container_name: rodhaj - image: ghcr.io/transprogrammer/rodhaj:latest + image: ghcr.io/transprogrammer/rodhaj:edge volumes: # Do not edit the next line. If you want to change the path of the configuration file, please edit the CONFIG_LOCATION variable - ${CONFIG_LOCATION}:/rodhaj/bot/config.yml diff --git a/envs/docker.env b/envs/docker.env deleted file mode 100644 index 6e985a3..0000000 --- a/envs/docker.env +++ /dev/null @@ -1,12 +0,0 @@ -# Docker Compose ENV file -# This is used for setting up the PostgreSQL server -# found within the docker compose file - -# Docker PostgreSQL root credientials -# This account has root access, so please ensure that this is a secure password -POSTGRES_USER=postgres -POSTGRES_PASSWORD=password - -# Account for the rodhaj user on PostgreSQL -# This is used to create the internal user, rodhaj -RODHAJ_PASSWORD=password \ No newline at end of file