forked from mirrors/protonmail-bridge-docker
Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
deb9b88e84 | ||
|
|
988de6e93b | ||
| 2f420a0bf9 | |||
|
|
946cd4ea8e | ||
|
|
932bc92e2a | ||
|
|
0ed338435d | ||
|
|
1b9e896e30 | ||
|
|
d9fec14796 | ||
|
|
b6a470849e | ||
|
|
ddb3df2c7c | ||
|
|
58cd2eee1d | ||
|
|
3cbc54a93b | ||
|
|
868b1a48c6 | ||
|
|
0419d36658 | ||
|
|
67415bd261 | ||
|
|
d0e4bcd866 | ||
|
|
5a0238e8f4 | ||
|
|
1dff35b541 | ||
|
|
7790563b9f | ||
|
|
7c0d8737dc | ||
|
|
50ac4c2e44 | ||
|
|
b1b6706030 | ||
|
|
b0eeddd83d | ||
|
|
a264602469 | ||
|
|
6a492a15e7 | ||
|
|
bb34034cbb | ||
|
|
109da843e7 | ||
|
|
b5938721aa | ||
|
|
dc8590849b | ||
|
|
8c80cf2d03 | ||
|
|
e6319a0dda | ||
|
|
da1b515c2f | ||
|
|
18626db87f |
57
.drone.yml
Normal file
57
.drone.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: docker-build
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.jvalver.de
|
||||
username:
|
||||
from_secret: username
|
||||
password:
|
||||
from_secret: password
|
||||
repo: git.jvalver.de/thilawyn/protonmail-bridge-docker
|
||||
dockerfile: build/Dockerfile
|
||||
dry_run: true
|
||||
context: build
|
||||
autotag: true
|
||||
compress: true
|
||||
platform: linux/amd64
|
||||
|
||||
trigger:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
branch:
|
||||
exclude:
|
||||
- master
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: docker-build-and-publish
|
||||
|
||||
steps:
|
||||
- name: build-and-publish
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.jvalver.de
|
||||
username:
|
||||
from_secret: username
|
||||
password:
|
||||
from_secret: password
|
||||
repo: git.jvalver.de/thilawyn/protonmail-bridge-docker
|
||||
dockerfile: build/Dockerfile
|
||||
context: build
|
||||
autotag: true
|
||||
compress: true
|
||||
platform: linux/amd64
|
||||
|
||||
trigger:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
branch:
|
||||
- master
|
||||
176
.github/workflows/build.yaml
vendored
176
.github/workflows/build.yaml
vendored
@@ -19,120 +19,74 @@ env:
|
||||
PLATFORMS: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/riscv64
|
||||
|
||||
jobs:
|
||||
build-binary:
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
arch: ["amd64", "arm64", "arm", "riscv64"]
|
||||
fail-fast: true
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
registry:
|
||||
image: registry:2
|
||||
ports:
|
||||
- 5000:5000
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: main
|
||||
uses: actions/checkout@master
|
||||
- name: Set version
|
||||
id: version
|
||||
run: echo "version=`cat main/build/VERSION`" >> $GITHUB_OUTPUT
|
||||
- name: Checkout proton bridge repo
|
||||
uses: actions/checkout@v3
|
||||
run: echo "::set-output name=version::`cat build/VERSION`"
|
||||
- name: Set repo
|
||||
id: repo
|
||||
run: if [[ $GITHUB_REF == "refs/heads/master" ]]; then echo "::set-output name=repo::${DOCKER_REPO}"; else echo "::set-output name=repo::${DOCKER_REPO_DEV}"; fi
|
||||
- name: Docker meta
|
||||
id: docker_meta
|
||||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
with:
|
||||
repository: ProtonMail/proton-bridge
|
||||
ref: v${{ steps.version.outputs.version }}
|
||||
path: proton-bridge
|
||||
- name: Set up golang
|
||||
uses: actions/setup-go@v3
|
||||
images: ${{ steps.repo.outputs.repo }}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
go-version: 1.18
|
||||
check-latest: true
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get install -y --no-install-recommends build-essential libsecret-1-dev
|
||||
- name: Download go dep
|
||||
if: ${{ matrix.arch == 'arm' }}
|
||||
working-directory: proton-bridge
|
||||
# Build once to download deps.
|
||||
# This step is expected to fail.
|
||||
run: make build-nogui || true
|
||||
env:
|
||||
GOARCH: ${{ matrix.arch }}
|
||||
- name: Patch for 32 bit arch
|
||||
if: ${{ matrix.arch == 'arm' }}
|
||||
# For 32bit architectures, there was a overflow error on the parser
|
||||
# This is a workaround for this problem found at:
|
||||
# https://github.com/antlr/antlr4/issues/2433#issuecomment-774514106
|
||||
run: find $(go env GOPATH)/pkg/mod/github.com/\!proton\!mail/go-rfc5322*/ -type f -exec sed -i.bak 's/(1<</(int64(1)<</g' {} +
|
||||
- name: Build binary
|
||||
working-directory: proton-bridge
|
||||
run: make build-nogui
|
||||
env:
|
||||
GOARCH: ${{ matrix.arch }}
|
||||
# build:
|
||||
# runs-on: ubuntu-latest
|
||||
# services:
|
||||
# registry:
|
||||
# image: registry:2
|
||||
# ports:
|
||||
# - 5000:5000
|
||||
# steps:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@master
|
||||
# - name: Set version
|
||||
# id: version
|
||||
# run: echo "::set-output name=version::`cat build/VERSION`"
|
||||
# - name: Set repo
|
||||
# id: repo
|
||||
# run: if [[ $GITHUB_REF == "refs/heads/master" ]]; then echo "::set-output name=repo::${DOCKER_REPO}"; else echo "::set-output name=repo::${DOCKER_REPO_DEV}"; fi
|
||||
# - name: Docker meta
|
||||
# id: docker_meta
|
||||
# uses: crazy-max/ghaction-docker-meta@v1
|
||||
# with:
|
||||
# images: ${{ steps.repo.outputs.repo }}
|
||||
# - name: Set up QEMU
|
||||
# uses: docker/setup-qemu-action@v1
|
||||
# - name: Set up Docker Buildx
|
||||
# uses: docker/setup-buildx-action@v1
|
||||
# with:
|
||||
# driver-opts: network=host
|
||||
# - name: Build image without push to registry
|
||||
# uses: docker/build-push-action@v2
|
||||
# with:
|
||||
# context: ./build
|
||||
# file: ./build/Dockerfile
|
||||
# platforms: ${{ env.PLATFORMS }}
|
||||
# push: true
|
||||
# tags: localhost:5000/protonmail-bridge:latest
|
||||
# - name: Scan image
|
||||
# id: scan
|
||||
# uses: anchore/scan-action@v2
|
||||
# with:
|
||||
# image: localhost:5000/protonmail-bridge:latest
|
||||
# fail-build: true
|
||||
# severity-cutoff: critical
|
||||
# acs-report-enable: true
|
||||
# - name: Upload Anchore scan SARIF report
|
||||
# uses: github/codeql-action/upload-sarif@v1
|
||||
# with:
|
||||
# sarif_file: ${{ steps.scan.outputs.sarif }}
|
||||
# - name: Login to DockerHub
|
||||
# uses: docker/login-action@v1
|
||||
# if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
|
||||
# with:
|
||||
# username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
# password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
# - name: Login to GitHub Container Registry
|
||||
# uses: docker/login-action@v1
|
||||
# if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/dev' }}
|
||||
# with:
|
||||
# registry: ghcr.io
|
||||
# username: ${{ github.repository_owner }}
|
||||
# password: ${{ secrets.CR_PAT }}
|
||||
# - name: Push image
|
||||
# uses: docker/build-push-action@v2
|
||||
# with:
|
||||
# context: ./build
|
||||
# file: ./build/Dockerfile
|
||||
# platforms: ${{ env.PLATFORMS }}
|
||||
# tags: |
|
||||
# ${{ steps.repo.outputs.repo }}:build
|
||||
# ${{ steps.repo.outputs.repo }}:${{ steps.version.outputs.version }}-build
|
||||
# labels: ${{ steps.docker_meta.outputs.labels }}
|
||||
# push: ${{ github.event_name != 'pull_request' }}
|
||||
driver-opts: network=host
|
||||
- name: Build image without push to registry
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./build
|
||||
file: ./build/Dockerfile
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
push: true
|
||||
tags: localhost:5000/protonmail-bridge:latest
|
||||
- name: Scan image
|
||||
id: scan
|
||||
uses: anchore/scan-action@v2
|
||||
with:
|
||||
image: localhost:5000/protonmail-bridge:latest
|
||||
fail-build: true
|
||||
severity-cutoff: critical
|
||||
acs-report-enable: true
|
||||
- name: Upload Anchore scan SARIF report
|
||||
uses: github/codeql-action/upload-sarif@v1
|
||||
with:
|
||||
sarif_file: ${{ steps.scan.outputs.sarif }}
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
|
||||
with:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/dev' }}
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.CR_PAT }}
|
||||
- name: Push image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./build
|
||||
file: ./build/Dockerfile
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
tags: |
|
||||
${{ steps.repo.outputs.repo }}:build
|
||||
${{ steps.repo.outputs.repo }}:${{ steps.version.outputs.version }}-build
|
||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# Use carlosedp/golang for riscv64 support
|
||||
FROM carlosedp/golang:1.18 AS build
|
||||
FROM golang:1.20-bookworm AS build
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update && apt-get install -y git build-essential libsecret-1-dev
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.0.9
|
||||
3.4.0
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
GOLANG_VERSION=1.18.7
|
||||
|
||||
ARCH=$(uname -m)
|
||||
if [[ $ARCH == "riscv64" ]]; then
|
||||
# There is no official riscv64 release. Use carlosedp/riscv-bringup instead.
|
||||
wget
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM ubuntu:bionic
|
||||
FROM ubuntu:jammy
|
||||
LABEL maintainer="Xiaonan Shen <s@sxn.dev>"
|
||||
|
||||
EXPOSE 25/tcp
|
||||
|
||||
@@ -1 +1 @@
|
||||
2.3.0-1
|
||||
3.3.2-1
|
||||
18
docker-compose.yml
Normal file
18
docker-compose.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
version: '2.1'
|
||||
|
||||
services:
|
||||
protonmail-bridge:
|
||||
image: shenxn/protonmail-bridge
|
||||
# build:
|
||||
# context: ./build
|
||||
# dockerfile: Dockerfile
|
||||
container_name: pm_bridge
|
||||
ports:
|
||||
- 1025:25/tcp
|
||||
- 1143:143/tcp
|
||||
restart: unless-stopped
|
||||
stdin_open: true
|
||||
tty: true
|
||||
volumes:
|
||||
protonmail:
|
||||
name: protonmail
|
||||
Reference in New Issue
Block a user