Change release branch constraints (#1248)

* updating the release branch constraints

* updating the self host docker image build and release with the new release branch

* renaming the release job for selfhost docker release

* removing unneeded line

* removing the master branch release ci code execution

* updating some verbiage
This commit is contained in:
Joseph Flinn 2021-10-21 10:31:41 -07:00 committed by GitHub
parent 9dd859af7a
commit 618f950cae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 13 deletions

View File

@ -228,24 +228,35 @@ jobs:
if: github.ref == 'refs/heads/master'
run: docker tag bitwarden/web bitwarden/web:dev
- name: Tag release branch
if: github.ref == 'refs/heads/release'
run: docker tag bitwarden/web bitwarden/web:latest
- name: List Docker images
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
run: docker images
- name: Push rc images
- name: Push rc image
if: github.ref == 'refs/heads/rc'
run: docker push bitwarden/web:rc
env:
DOCKER_CONTENT_TRUST: 1
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.setup-dct.outputs.dct-delegate-repo-passphrase }}
- name: Push dev images
- name: Push dev image
if: github.ref == 'refs/heads/master'
run: docker push bitwarden/web:dev
env:
DOCKER_CONTENT_TRUST: 1
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.setup-dct.outputs.dct-delegate-repo-passphrase }}
- name: Push latest image
if: github.ref == 'refs/heads/release'
run: docker push bitwarden/web:latest
env:
DOCKER_CONTENT_TRUST: 1
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.setup-dct.outputs.dct-delegate-repo-passphrase }}
- name: Log out of Docker
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
run: docker logout

View File

@ -15,9 +15,9 @@ jobs:
steps:
- name: Branch check
run: |
if [[ "$GITHUB_REF" != "refs/heads/rc" ]]; then
if [[ "$GITHUB_REF" != "refs/heads/release" ]]; then
echo "==================================="
echo "[!] Can only release from rc branch"
echo "[!] Can only release from the 'release' branch"
echo "==================================="
exit 1
fi
@ -43,7 +43,7 @@ jobs:
self-host:
name: Build self-host docker
name: Release self-host docker
runs-on: ubuntu-20.04
needs: setup
env:
@ -66,20 +66,18 @@ jobs:
- name: Checkout repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Pull latest selfhost rc image
run: docker pull bitwarden/web:rc
- name: Pull latest selfhost Release image
run: docker pull bitwarden/web:latest
- name: Tag version
run: |
docker tag bitwarden/web:rc bitwarden/web:latest
docker tag bitwarden/web:rc bitwarden/web:$_RELEASE_VERSION
docker tag bitwarden/web:latest bitwarden/web:$_RELEASE_VERSION
- name: List Docker images
run: docker images
- name: Push images
run: |
docker push bitwarden/web:latest
docker push bitwarden/web:$_RELEASE_VERSION
env:
DOCKER_CONTENT_TRUST: 1
@ -108,7 +106,7 @@ jobs:
run: |
git switch -c deploy-$_TAG_VERSION
git push -u origin deploy-$_TAG_VERSION
git switch rc
git switch release
- name: Setup git config
run: |
@ -122,7 +120,7 @@ jobs:
with:
workflow: build.yml
workflow_conclusion: success
branch: rc
branch: release
artifacts: web-*-cloud-COMMERCIAL.zip
# This should result in a build directory in the current working directory
@ -163,7 +161,7 @@ jobs:
with:
workflow: build.yml
workflow_conclusion: success
branch: rc
branch: release
artifacts: "web-*-selfhosted-COMMERCIAL.zip,
web-*-selfhosted-open-source.zip"