Skip to content
Merged
Show file tree
Hide file tree
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
74 changes: 44 additions & 30 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,47 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v5

- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go_version }}

- name: Get dependencies
run: |
go mod download

- name: Build
run: go build -v ./...

- name: Test
run: "go test -v -short -race -coverprofile='coverage.out' ./..."
shell: bash

- name: Code coverage
uses: codecov/codecov-action@v5
with:
env_vars: OS,GO
files: ./coverage.out
flags: unittests
fail_ci_if_error: false
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
continue-on-error: true
- name: Check out code into the Go module directory
uses: actions/checkout@v5

- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go_version }}

- name: Get dependencies
run: |
go mod download

- name: Build
run: go build -v ./...

- name: Test
run: "go test -v -short -race -coverprofile='coverage.out' ./..."
shell: bash

- name: Code coverage
uses: codecov/codecov-action@v5
with:
env_vars: OS,GO
files: ./coverage.out
flags: unittests
fail_ci_if_error: false
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
continue-on-error: true

goreleaser:
name: Check GoReleaser configurations
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v5

- name: Check GoReleaser configurations
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: check .goreleaser-docker-only.yml .goreleaser.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 7 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install eget
run: go install github.com/zyedidia/eget@latest
env:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,22 @@ jobs:
go-version: ~1.25
check-latest: true

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install eget
run: go install github.com/zyedidia/eget@latest
env:
Expand Down
61 changes: 19 additions & 42 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,51 +61,28 @@ changelog:
- "^docs:"
- "^test:"

dockers:
- image_templates:
- "creativeprojects/imap:latest-amd64"
- "creativeprojects/imap:{{ .RawVersion }}-amd64"
ids:
- imap_targz
use: buildx
goos: linux
goarch: amd64
dockers_v2:
- images:
- "creativeprojects/imap"
- "ghcr.io/creativeprojects/imap"
dockerfile: build/Dockerfile
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--platform=linux/amd64"
- "--build-arg=ARCH=amd64"
- image_templates:
- "creativeprojects/imap:latest-arm64v8"
- "creativeprojects/imap:{{ .RawVersion }}-arm64v8"
ids:
- imap_targz
use: buildx
goos: linux
goarch: arm64
dockerfile: build/Dockerfile
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--platform=linux/arm64/v8"
- "--build-arg=ARCH=arm64"

docker_manifests:
- name_template: creativeprojects/imap:{{ .RawVersion }}
image_templates:
- creativeprojects/imap:{{ .RawVersion }}-amd64
- creativeprojects/imap:{{ .RawVersion }}-arm64v8
- name_template: creativeprojects/imap:latest
image_templates:
- creativeprojects/imap:latest-amd64
- creativeprojects/imap:latest-arm64v8
tags:
- "{{ .RawVersion }}"
- "{{ if .IsNightly }}nightly{{ end }}"
- "{{ if not .IsNightly }}latest{{ end }}"
labels:
"org.opencontainers.image.description": "IMAP tools: backup, copy, move your emails between servers and locally"
"org.opencontainers.image.created": "{{.Date}}"
"org.opencontainers.image.name": "{{.ProjectName}}"
"org.opencontainers.image.title": "{{.ProjectName}}"
"org.opencontainers.image.revision": "{{.FullCommit}}"
"org.opencontainers.image.version": "{{.Version}}"
"org.opencontainers.image.source": "{{.GitURL}}"
platforms:
- linux/amd64
- linux/arm64

brews:
- name: imap
Expand Down
1 change: 0 additions & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ FROM alpine:latest

LABEL maintainer Fred <[email protected]>

ARG ARCH=amd64
ARG TARGETPLATFORM

COPY $TARGETPLATFORM/imap /usr/bin/imap
Expand Down
Loading