From cc319ba0a7339c5395aaa472672dffd60994fd85 Mon Sep 17 00:00:00 2001 From: Xiaonan Shen Date: Thu, 19 Nov 2020 19:46:18 -0800 Subject: [PATCH] Move deb packing under deb folder (#12) --- .github/workflows/build.yaml | 11 ++++------- .github/workflows/{main.yaml => deb.yaml} | 18 +++++++++--------- .gitignore | 1 - .dockerignore => deb/.dockerignore | 0 Dockerfile => deb/Dockerfile | 0 VERSION => deb/VERSION | 0 entrypoint.sh => deb/entrypoint.sh | 0 gpgparams => deb/gpgparams | 0 install.sh => deb/install.sh | 0 update-check.sh => deb/update-check.sh | 0 push-tag.sh | 11 ----------- 11 files changed, 13 insertions(+), 28 deletions(-) rename .github/workflows/{main.yaml => deb.yaml} (84%) rename .dockerignore => deb/.dockerignore (100%) rename Dockerfile => deb/Dockerfile (100%) rename VERSION => deb/VERSION (100%) rename entrypoint.sh => deb/entrypoint.sh (100%) rename gpgparams => deb/gpgparams (100%) rename install.sh => deb/install.sh (100%) rename update-check.sh => deb/update-check.sh (100%) delete mode 100644 push-tag.sh diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7c96637..64590cf 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,14 +7,11 @@ on: - dev paths: - .github/workflows/build.yaml - - build/.dockerignore - - build/build-docker.sh - - build/build.sh - - build/Dockerfile - - build/entrypoint.sh - - build/gpgparams - - build/VERSION + - build/* pull_request: + paths: + - .github/workflows/build.yaml + - build/* env: DOCKER_REPO: shenxn/protonmail-bridge diff --git a/.github/workflows/main.yaml b/.github/workflows/deb.yaml similarity index 84% rename from .github/workflows/main.yaml rename to .github/workflows/deb.yaml index cdccfd5..fb0530e 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/deb.yaml @@ -6,28 +6,26 @@ on: - master - dev paths: - - .github/workflows/main.yaml - - .dockerignore - - Dockerfile - - entrypoint.sh - - gpgparams - - install.sh - - VERSION + - .github/workflows/deb.yaml + - deb/* pull_request: + paths: + - .github/workflows/deb.yaml + - deb/* env: DOCKER_REPO: shenxn/protonmail-bridge DOCKER_REPO_DEV: shenxn/protonmail-bridge-dev jobs: - build: + deb: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@master - name: Set version id: version - run: echo "::set-output name=version::`cat VERSION`" + run: echo "::set-output name=version::`cat deb/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 @@ -46,6 +44,8 @@ jobs: password: ${{ secrets.REGISTRY_PASSWORD }} - uses: docker/build-push-action@v2 with: + context: ./deb + file: ./deb/Dockerfile tags: | ${{ steps.repo.outputs.repo }}:latest ${{ steps.repo.outputs.repo }}:${{ steps.version.outputs.version }} diff --git a/.gitignore b/.gitignore index e619f9c..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +0,0 @@ -deb diff --git a/.dockerignore b/deb/.dockerignore similarity index 100% rename from .dockerignore rename to deb/.dockerignore diff --git a/Dockerfile b/deb/Dockerfile similarity index 100% rename from Dockerfile rename to deb/Dockerfile diff --git a/VERSION b/deb/VERSION similarity index 100% rename from VERSION rename to deb/VERSION diff --git a/entrypoint.sh b/deb/entrypoint.sh similarity index 100% rename from entrypoint.sh rename to deb/entrypoint.sh diff --git a/gpgparams b/deb/gpgparams similarity index 100% rename from gpgparams rename to deb/gpgparams diff --git a/install.sh b/deb/install.sh similarity index 100% rename from install.sh rename to deb/install.sh diff --git a/update-check.sh b/deb/update-check.sh similarity index 100% rename from update-check.sh rename to deb/update-check.sh diff --git a/push-tag.sh b/push-tag.sh deleted file mode 100644 index 698d6d9..0000000 --- a/push-tag.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/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}"