Skip to content

Commit

Permalink
Merge pull request #384 from atsign-foundation/cpswan-canary-releases
Browse files Browse the repository at this point in the history
Add canary release
  • Loading branch information
sitaram-kalluri authored Nov 10, 2021
2 parents 1534d59 + 2dd2690 commit 8328cd4
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/at_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
push:
tags:
- 'v*.*.*'
- 'c*.*.*'
branches:
- trunk
pull_request:
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 8328cd4

Please sign in to comment.