-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #384 from atsign-foundation/cpswan-canary-releases
Add canary release
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ on: | |
push: | ||
tags: | ||
- 'v*.*.*' | ||
- 'c*.*.*' | ||
branches: | ||
- trunk | ||
pull_request: | ||
|
@@ -483,6 +484,49 @@ jobs: | |
- name: Image digest of secondary server | ||
run: echo ${{ steps.docker_build_observable_secondary.outputs.digest }} | ||
|
||
# The below jobs run's on completion of 'run_end2end_tests' job. | ||
# This job run's on trigger event 'push' and when a canary release is tagged. | ||
# The job builds the canary version of secondary server docker image and pushes to docker hub. | ||
push_canary_secondary_image: | ||
# Runs only after functional tests are completed. | ||
needs: [ unit_tests, functional_tests, end2end_tests ] | ||
if: ${{ github.repository == 'atsign-foundation/at_server' && github.event_name == 'push' && contains(github.ref, 'refs/tags/c') }} | ||
env: | ||
working-directory: at_server | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Extract version for docker tag | ||
- name: Get version | ||
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
|
||
- name: Set up QEMU | ||
uses: docker/[email protected] | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Login to DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
# Builds and pushes the secondary server image to docker hub. | ||
- name: Build and push secondary image for amd64 and arm64 | ||
id: docker_build_secondary | ||
uses: docker/[email protected] | ||
with: | ||
push: true | ||
context: at_secondary | ||
tags: | | ||
atsigncompany/secondary:canary | ||
atsigncompany/secondary:canary-${{ env.VERSION }} | ||
platforms: | | ||
linux/amd64 | ||
# The below jobs run's on completion of 'run_end2end_tests' job. | ||
# This job run's on trigger event 'push' and when a release is tagged. | ||
# The job builds the production version of secondary server docker image and pushes to docker hub. | ||
|