conversation observer for chat editor toggling #1032
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
name: Push Docker Image | |
on: | |
push: | |
branches: | |
- master | |
- main | |
- stage | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login into Registry | |
uses: azure/docker-login@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: actions/checkout@v2 | |
- name: Get Short SHA | |
id: vars | |
run: | | |
echo ::set-output name=short_sha::$(git rev-parse --short=7 ${{ github.sha }}) | |
- name: Build the Docker image | |
run: | | |
docker build --build-arg APP_ENV=production \ | |
--build-arg RUBY_VERSION=3.2.0 \ | |
--build-arg PG_MAJOR=11 \ | |
--build-arg NODE_MAJOR=16 \ | |
--build-arg YARN_VERSION=1.13.0 \ | |
--build-arg BUNDLER_VERSION=2.3.26 \ | |
-t $GITHUB_REPOSITORY \ | |
. | |
- name: Tag and Push Docker image | |
if: github.event_name == 'push' | |
run: | | |
docker tag $GITHUB_REPOSITORY $GITHUB_REPOSITORY:$SHORT_SHA | |
docker push $GITHUB_REPOSITORY:$SHORT_SHA | |
echo "SHORT_SHA: ${SHORT_SHA}" | |
env: | |
SHORT_SHA: ${{ steps.vars.outputs.short_sha }} | |
- name: Tag LATEST and Push Docker image | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
run: | | |
docker tag $GITHUB_REPOSITORY $GITHUB_REPOSITORY:latest | |
docker push $GITHUB_REPOSITORY:latest | |
echo "LATEST deployed!" | |
- name: Tag RELEASE and Push Docker image | |
if: github.event_name == 'release' | |
run: | | |
docker tag $GITHUB_REPOSITORY $GITHUB_REPOSITORY:${{ github.ref_name }} | |
docker push $GITHUB_REPOSITORY:${{ github.ref_name }} | |
echo "${{ github.ref_name }} deployed!" |