Self-hosted email delivery platform that enables applications to send emails via HTTP APIs while handling SMTP delivery, templates, storage, security, and analytics. Fully self-hostable alternative to services like SendGrid or Mailgun.
Go email-relayemail-routinghttp-to-smtpmail-deliverymailchimp-alternativemailgun-alternativemailsendermailservermailtemplatemailtestpostmark-alternativesend-emailsendgrid-alternativesendmailtransactional-emailtransactional-outbox
ci: update workflows to current action versions
Jonas Kaninda0c0e1aef3976
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 6b9a34c..015b5a7 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -6,6 +6,13 @@ on:pull_request:branches: [main, dev]+permissions:+ contents: read++concurrency:+ group: ci-${{ github.workflow }}-${{ github.ref }}+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}+jobs:backend:runs-on: ubuntu-latest@@ -31,35 +38,45 @@ jobs:--health-timeout 5s--health-retries 5steps:- - uses: actions/checkout@v4- - uses: actions/setup-go@v5+ - uses: actions/checkout@v7+ - uses: actions/setup-go@v7with:- go-version: '1.26'+ # Read the version from go.mod so the toolchain has one source of truth.+ go-version-file: go.mod- run: go vet ./...- run: go test ./...+ env:+ TEST_DATABASE_DSN: host=localhost user=posta password=posta dbname=posta port=5432 sslmode=disable- run: go build -o posta ./cmd/postafrontend:runs-on: ubuntu-lateststeps:- - uses: actions/checkout@v4- - uses: actions/setup-node@v4+ - uses: actions/checkout@v7+ - uses: actions/setup-node@v7with:node-version: '24'cache: 'npm'cache-dependency-path: web/package-lock.json- - run: cd web && npm ci && npm run build+ - run: npm ci+ working-directory: web+ - run: npm run type-check+ working-directory: web+ - run: npm run build+ working-directory: webdocker:needs: [backend, frontend]if: github.event_name == 'push' && github.ref == 'refs/heads/main'runs-on: ubuntu-lateststeps:- - uses: actions/checkout@v4- - uses: docker/setup-buildx-action@v3- - uses: docker/build-push-action@v6+ - uses: actions/checkout@v7+ - uses: docker/setup-buildx-action@v4+ - uses: docker/build-push-action@v7with:context: .- file: "./docker/Dockerfile"+ file: ./docker/Dockerfilepush: falsetags: posta:latest+ cache-from: type=gha+ cache-to: type=gha,mode=maxdiff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.ymlindex cf6ea3a..a5346f4 100644--- a/.github/workflows/deploy-docs.yml+++ b/.github/workflows/deploy-docs.yml@@ -6,6 +6,7 @@ on:- mainpaths:- "docs/**"+ - ".github/workflows/deploy-docs.yml"workflow_dispatch:permissions:@@ -24,11 +25,11 @@ jobs:run:working-directory: docssteps:- - uses: actions/checkout@v4+ - uses: actions/checkout@v7- - uses: actions/setup-node@v4+ - uses: actions/setup-node@v7with:- node-version: 24+ node-version: '24'cache: npmcache-dependency-path: docs/package-lock.json@@ -39,7 +40,7 @@ jobs:run: npm run build- name: Upload artifact- uses: actions/upload-pages-artifact@v3+ uses: actions/upload-pages-artifact@v5with:path: docs/build@@ -52,4 +53,4 @@ jobs:steps:- name: Deploy to GitHub Pagesid: deployment- uses: actions/deploy-pages@v4+ uses: actions/deploy-pages@v5diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.ymlindex a7fc8e4..8e4f68c 100644--- a/.github/workflows/lint.yml+++ b/.github/workflows/lint.yml@@ -2,22 +2,33 @@ name: Linton:push:+ branches: [main, dev]pull_request:+ branches: [main, dev]++permissions:+ contents: read++concurrency:+ group: lint-${{ github.workflow }}-${{ github.ref }}+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}jobs:- lint:- name: Run on Ubuntu+ golangci:+ name: golangci-lintruns-on: ubuntu-lateststeps:- name: Clone the code- uses: actions/checkout@v4+ uses: actions/checkout@v7- name: Setup Go- uses: actions/setup-go@v5+ uses: actions/setup-go@v7with:- go-version: '~1.26'+ go-version-file: go.mod- name: Run linter- uses: golangci/golangci-lint-action@v7+ uses: golangci/golangci-lint-action@v9with:- version: v2.9.0\ No newline at end of file+ # Pinned rather than floating: a new linter release must not turn a+ # green branch red on a day nobody touched the code.+ version: v2.13.2diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex ef54dbc..ef4544b 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -1,95 +1,66 @@name: Release+on:push:tags:- - v0.**+ - 'v*'++permissions:+ contents: read+ packages: write++concurrency:+ group: release-${{ github.ref }}+ cancel-in-progress: false+jobs:- # Stable releases (v0.11.0): publish the immutable version tag and move- # :latest. Release candidates are excluded here and handled by docker-rc, so a- # pre-release never becomes what a bare `docker pull` resolves to.+ # One job for both channels. A stable tag (v1.2.0) publishes the immutable+ # version plus :latest; a release candidate (v1.2.0-rc.1) publishes the version+ # plus :rc, so a pre-release never becomes what a bare `docker pull` resolves+ # to. Keeping this as one job means the two channels cannot drift apart.docker:- if: "!contains(github.ref, '-rc')"runs-on: ubuntu-latest- permissions:- packages: write- contents: readsteps:- -- name: Set up QEMU- uses: docker/setup-qemu-action@v3- -- name: Set up Docker Buildx- uses: docker/setup-buildx-action@v3- -- name: Login to DockerHub- uses: docker/login-action@v3- with:- username: ${{ secrets.DOCKERHUB_USERNAME }}- password: ${{ secrets.DOCKERHUB_TOKEN }}- -- name: Get the tag name- id: get_tag_name- run: |- # Extract tag name and remove "v" if present- TAG_NAME="${GITHUB_REF#refs/tags/}"- VERSION="${TAG_NAME#v}"- echo "VERSION=${VERSION}" >> "$GITHUB_ENV"- echo "BUILD_TIME=$(date)" >> "$GITHUB_ENV"- -- name: Build and push- uses: docker/build-push-action@v6- with:- push: true- file: "./docker/Dockerfile"- platforms: linux/amd64,linux/arm64- build-args: |- VERSION=${{ env.VERSION }}- BUILD_DATE=${{ env.BUILD_TIME }}- COMMIT=${{ github.sha }}- tags: |- "${{vars.BUILDKIT_IMAGE}}:${{ env.VERSION }}"- "${{vars.BUILDKIT_IMAGE}}:latest"+ - name: Set up QEMU+ uses: docker/setup-qemu-action@v4+ - name: Set up Docker Buildx+ uses: docker/setup-buildx-action@v4- docker-rc:- if: "contains(github.ref, '-rc')"- runs-on: ubuntu-latest- permissions:- packages: write- contents: read- steps:- -- name: Set up QEMU- uses: docker/setup-qemu-action@v3- -- name: Set up Docker Buildx- uses: docker/setup-buildx-action@v3- -- name: Login to DockerHub- uses: docker/login-action@v3+ - name: Login to DockerHub+ uses: docker/login-action@v4with:username: ${{ secrets.DOCKERHUB_USERNAME }}password: ${{ secrets.DOCKERHUB_TOKEN }}- -- name: Get the tag name- id: get_tag_name++ - name: Resolve version and channelrun: |- # Extract tag name and remove "v" if present+ set -euo pipefailTAG_NAME="${GITHUB_REF#refs/tags/}"VERSION="${TAG_NAME#v}"- echo "VERSION=${VERSION}" >> "$GITHUB_ENV"- echo "BUILD_TIME=$(date)" >> "$GITHUB_ENV"- -- name: Build and push- uses: docker/build-push-action@v6+ if [[ "$TAG_NAME" == *-rc* ]]; then+ CHANNEL_TAG="rc"+ else+ CHANNEL_TAG="latest"+ fi+ {+ echo "VERSION=${VERSION}"+ echo "CHANNEL_TAG=${CHANNEL_TAG}"+ echo "BUILD_TIME=$(date -u +%Y-%m-%dT%H:%M:%SZ)"+ } >> "$GITHUB_ENV"++ - name: Build and push+ uses: docker/build-push-action@v7with:push: true- file: "./docker/Dockerfile"+ file: ./docker/Dockerfileplatforms: linux/amd64,linux/arm64build-args: |VERSION=${{ env.VERSION }}BUILD_DATE=${{ env.BUILD_TIME }}COMMIT=${{ github.sha }}tags: |- "${{vars.BUILDKIT_IMAGE}}:${{ env.VERSION }}"- "${{vars.BUILDKIT_IMAGE}}:rc"+ ${{ vars.BUILDKIT_IMAGE }}:${{ env.VERSION }}+ ${{ vars.BUILDKIT_IMAGE }}:${{ env.CHANNEL_TAG }}+ cache-from: type=gha+ cache-to: type=gha,mode=max