mirror of
https://github.com/shenxn/protonmail-bridge-docker.git
synced 2026-01-18 14:44:41 +01:00
Some improvements
This commit is contained in:
15
.github/workflows/build.yaml
vendored
15
.github/workflows/build.yaml
vendored
@@ -24,9 +24,11 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: Set version
|
||||
- name: Set bridge version
|
||||
id: version
|
||||
run: echo "::set-output name=version::`cat VERSION`"
|
||||
run: |
|
||||
echo "::set-output name=bridge_version::$(cat BRIDGE_VERSION)"
|
||||
echo "::set-output name=version::$(cat 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
|
||||
@@ -45,6 +47,7 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
build-args: BRIDGE_VERSION=${{ steps.version.outputs.bridge_version }}
|
||||
push: true
|
||||
tags: localhost:5000/protonmail-bridge:latest
|
||||
- name: Scan image
|
||||
@@ -75,11 +78,11 @@ jobs:
|
||||
- name: Push image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./build
|
||||
file: ./build/Dockerfile
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
build-args: BRIDGE_VERSION=${{ steps.version.outputs.bridge_version }}
|
||||
tags: |
|
||||
${{ steps.repo.outputs.repo }}:build
|
||||
${{ steps.repo.outputs.repo }}:${{ steps.version.outputs.version }}-build
|
||||
${{ steps.repo.outputs.repo }}:beta
|
||||
${{ steps.repo.outputs.repo }}:${{ steps.version.outputs.version }}
|
||||
${{ steps.repo.outputs.repo }}:${{ steps.version.outputs.bridge-version }}-${{ steps.version.outputs.version }}
|
||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
|
||||
1
BRIDGE_VERSION
Normal file
1
BRIDGE_VERSION
Normal file
@@ -0,0 +1 @@
|
||||
v2.1.3
|
||||
@@ -3,9 +3,11 @@ FROM golang:1.15 AS build
|
||||
# Install dependencies
|
||||
RUN apt-get update && apt-get install -y libsecret-1-dev
|
||||
|
||||
ARG BRIDGE_VERSION
|
||||
|
||||
# Build
|
||||
WORKDIR /build/
|
||||
COPY build.sh VERSION /build/
|
||||
COPY build.sh /build/
|
||||
COPY http_rest_frontend /build/http_rest_frontend
|
||||
RUN bash build.sh
|
||||
|
||||
|
||||
6
build.sh
6
build.sh
@@ -7,13 +7,11 @@ VERSION=`cat VERSION`
|
||||
# Clone new code
|
||||
git clone https://github.com/ProtonMail/proton-bridge.git
|
||||
cd proton-bridge
|
||||
git checkout v$VERSION
|
||||
|
||||
ls /build
|
||||
git checkout ${BRIDGE_VERSION}
|
||||
|
||||
# Patch HTTP REST frontend
|
||||
rm -rf internal/frontend/cli
|
||||
cp -r /build/http_rest_frontend/cli internal/frontend/cli
|
||||
cp -r /build/http_rest_frontend/cli internal/frontend/
|
||||
|
||||
# Build
|
||||
if ! make build-nogui ; then
|
||||
|
||||
Reference in New Issue
Block a user