Skip to content
Open
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
19 changes: 10 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
Expand All @@ -33,11 +34,11 @@ jobs:
- uses: docker/build-push-action@v4
with:
push: true
tags: ghcr.io/postalserver/postal:ci-${{ github.sha }}
tags: ghcr.io/${{ github.repository_owner }}/postal:ci-${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
target: ci
platforms: linux/amd64
platforms: linux/amd64,linux/arm64

test:
name: Test Suite
Expand All @@ -54,10 +55,10 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- run: docker compose pull
env:
POSTAL_IMAGE: ghcr.io/postalserver/postal:ci-${{ github.sha }}
POSTAL_IMAGE: ghcr.io/${{ github.repository_owner }}/postal:ci-${{ github.sha }}
- run: docker compose run postal sh -c 'bundle exec rspec'
env:
POSTAL_IMAGE: ghcr.io/postalserver/postal:ci-${{ github.sha }}
POSTAL_IMAGE: ghcr.io/${{ github.repository_owner }}/postal:ci-${{ github.sha }}

release-branch:
name: Release (branch)
Expand All @@ -80,7 +81,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- id: info
run: |
IMAGE=ghcr.io/postalserver/postal
IMAGE=ghcr.io/${{ github.repository_owner }}/postal

REF="${GITHUB_REF#refs/heads/}"
if [ -z "$REF" ]; then exit 1; fi
Expand All @@ -103,7 +104,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
target: full
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
build-args: |
VERSION=${{ steps.info.outputs.version }}
BRANCH=${{ steps.info.outputs.branch }}
Expand All @@ -126,11 +127,11 @@ jobs:
with:
push: true
tags: |
ghcr.io/postalserver/postal:stable
ghcr.io/postalserver/postal:${{ needs.release-please.outputs.version }}
ghcr.io/${{ github.repository_owner }}/postal:stable
ghcr.io/${{ github.repository_owner }}/postal:${{ needs.release-please.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max
target: full
build-args: |
VERSION=${{ needs.release-please.outputs.version }}
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
Loading