From 83313ebe2da5431dc5a9ed04d95d840c350fd5a2 Mon Sep 17 00:00:00 2001 From: Arca Ege Cengiz Date: Sat, 29 Nov 2025 19:19:22 +0000 Subject: [PATCH 1/2] Rename production image tag to 'production' and add CI workflow for staging branch --- .github/workflows/docker-image-staging.yml | 18 ++++++++++++++++++ .github/workflows/docker-image.yml | 17 ++++++++--------- README.md | 4 ++-- 3 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/docker-image-staging.yml diff --git a/.github/workflows/docker-image-staging.yml b/.github/workflows/docker-image-staging.yml new file mode 100644 index 0000000..be5932c --- /dev/null +++ b/.github/workflows/docker-image-staging.yml @@ -0,0 +1,18 @@ +name: Docker Image CI + +on: + push: + branches: ['staging'] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build and publish a Docker image for ${{ github.repository }} + uses: macbre/push-to-ghcr@master + with: + image_name: ${{ github.repository }} + github_token: ${{ secrets.GITHUB_TOKEN }} + image_tag: staging diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 0bb88ea..1425b5c 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,18 +2,17 @@ name: Docker Image CI on: push: - branches: [ "main" ] + branches: ['main'] jobs: - build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Build and publish a Docker image for ${{ github.repository }} - uses: macbre/push-to-ghcr@master - with: - image_name: ${{ github.repository }} - github_token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 + - name: Build and publish a Docker image for ${{ github.repository }} + uses: macbre/push-to-ghcr@master + with: + image_name: ${{ github.repository }} + github_token: ${{ secrets.GITHUB_TOKEN }} + image_tag: production diff --git a/README.md b/README.md index 100decc..bd04b37 100644 --- a/README.md +++ b/README.md @@ -57,10 +57,10 @@ services: env_file: - .env pull_policy: always - image: ghcr.io/hackclub/construct:latest + image: ghcr.io/hackclub/construct:production networks: {} volumes: constructdb: ``` -Use the `staging` image tag instead of `latest` for the staging environment. +Use the `staging` image tag instead of `production` for the staging environment. From 263014c0ee0f569061ed4ca1d143ff9d1816116b Mon Sep 17 00:00:00 2001 From: Arca Ege Cengiz <40526225+ArcaEge@users.noreply.github.com> Date: Sat, 29 Nov 2025 19:44:11 +0000 Subject: [PATCH 2/2] Update .github/workflows/docker-image-staging.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/docker-image-staging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image-staging.yml b/.github/workflows/docker-image-staging.yml index be5932c..30d084f 100644 --- a/.github/workflows/docker-image-staging.yml +++ b/.github/workflows/docker-image-staging.yml @@ -1,4 +1,4 @@ -name: Docker Image CI +name: Docker Image CI (Staging) on: push: