mirror of
https://github.com/shenxn/protonmail-bridge-docker.git
synced 2025-12-06 08:27:08 +00:00
Use Docker Hub build
This commit is contained in:
parent
96351a72c0
commit
3f75d01226
18
.github/workflows/main.yaml
vendored
18
.github/workflows/main.yaml
vendored
@ -3,9 +3,9 @@ name: build
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
- 'v*'
|
||||
repository_dispatch:
|
||||
types: update
|
||||
types: build
|
||||
|
||||
env:
|
||||
DOCKER_TAG: shenxn/protonmail-bridge
|
||||
@ -44,13 +44,7 @@ jobs:
|
||||
asset_path: ./deb/${{ env.DEB_FILE }}
|
||||
asset_name: ${{ env.DEB_FILE }}
|
||||
asset_content_type: application/vnd.debian.binary-package
|
||||
- name: Docker Login
|
||||
uses: azure/docker-login@v1
|
||||
with:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
- name: Docker Build
|
||||
run: |
|
||||
docker build . -t ${DOCKER_TAG}:latest -t ${DOCKER_TAG}:${RELEASE}
|
||||
docker push ${DOCKER_TAG}:latest
|
||||
docker push ${DOCKER_TAG}:${RELEASE}
|
||||
- name: Push Tag to Trigger Docker Hub Build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: bash push-tag.sh
|
||||
|
||||
@ -19,7 +19,7 @@ if [[ RELEASE != CURR_RELEASE ]]; then
|
||||
git config --local user.name "Github Action"
|
||||
git add releaserc
|
||||
git commit -m "Release ${CURR_RELEASE}" --author="Xiaonan Shen <s@sxn.dev>"
|
||||
git tag -a ${CURR_RELEASE} -m "Release ${CURR_RELEASE}"
|
||||
git tag -a "v${CURR_RELEASE}" -m "Release ${CURR_RELEASE}"
|
||||
|
||||
# push
|
||||
REMOTE_REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
||||
@ -30,6 +30,6 @@ if [[ RELEASE != CURR_RELEASE ]]; then
|
||||
curl -H "Accept: application/vnd.github.everest-preview+json" \
|
||||
-H "Authorization: token ${PERSONAL_TOKEN}" \
|
||||
--request POST \
|
||||
--data '{"event_type": "update"}' \
|
||||
--data '{"event_type": "build"}' \
|
||||
https://api.github.com/repos/${GITHUB_REPOSITORY}/dispatches
|
||||
fi
|
||||
|
||||
11
push-tag.sh
Normal file
11
push-tag.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
source ./releaserc
|
||||
|
||||
git config --local user.email "actions@github.com"
|
||||
git config --local user.name "Github Action"
|
||||
git tag -a "r${RELEASE}" -m "Release ${RELEASE}"
|
||||
REMOTE_REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
||||
git push "${REMOTE_REPO}" "r${RELEASE}"
|
||||
Loading…
Reference in New Issue
Block a user