Add update check to build (#19)

* Remove armv7 temporarily

* Improve build script

* Add update check for build

* Update README

* Fix build script

* Change build version format

* Improve update check

* Bump build version to v1.5.4

* Fix build Dockerfile

* Fix build action yaml

Co-authored-by: GitHub Actions <actions@github.com>
This commit is contained in:
Xiaonan Shen
2021-01-07 18:19:11 +08:00
committed by GitHub
parent bde4667ff4
commit 2647f8540e
8 changed files with 78 additions and 59 deletions

View File

@@ -16,6 +16,7 @@ on:
env:
DOCKER_REPO: shenxn/protonmail-bridge
DOCKER_REPO_DEV: ghcr.io/shenxn/protonmail-bridge-dev
PLATFORMS: linux/amd64,linux/arm64/v8
jobs:
build:
@@ -45,12 +46,12 @@ jobs:
uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host
- name: Build image without push to DockerHub
- name: Build image without push to registry
uses: docker/build-push-action@v2
with:
context: ./build
file: ./build/Dockerfile
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
platforms: ${{ env.PLATFORMS }}
push: true
tags: localhost:5000/protonmail-bridge:latest
- name: Scan image
@@ -83,7 +84,7 @@ jobs:
with:
context: ./build
file: ./build/Dockerfile
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
platforms: ${{ env.PLATFORMS }}
tags: |
${{ steps.repo.outputs.repo }}:build
${{ steps.repo.outputs.repo }}:${{ steps.version.outputs.version }}-build

View File

@@ -7,11 +7,11 @@ on:
- dev
paths:
- .github/workflows/update-check.yaml
- update-check.sh
- update-check.py
pull_request:
paths:
- .github/workflows/update-check.yaml
- update-check.sh
- update-check.py
schedule:
- cron: '0 0 * * *' # runs everyday at midnight
@@ -24,4 +24,4 @@ jobs:
with:
token: ${{ secrets.PERSONAL_TOKEN }}
- name: Check Update
run: bash update-check.sh ${{ github.event_name == 'pull_request' }}
run: python3 update-check.py ${{ github.event_name == 'pull_request' }}