diff --git a/.github/workflows/docker-image-staging.yml b/.github/workflows/docker-image-staging.yml new file mode 100644 index 0000000..30d084f --- /dev/null +++ b/.github/workflows/docker-image-staging.yml @@ -0,0 +1,18 @@ +name: Docker Image CI (Staging) + +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.