Rails 5.0 -- Fix comments_controller_spec.rb and moderations_controll… #2
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: Deploy Staging Canary | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
deploy_staging_canary: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to GitHub Container Registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: azure/login@v2 | |
with: | |
creds: '${{ secrets.AZURE_AKS }}' | |
- uses: azure/aks-set-context@v4 | |
with: | |
resource-group: kubernetes | |
cluster-name: microservices | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Create commit_id.txt | |
run: echo '${{ github.sha }}-next' > commit_id.txt | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: Dockerfile.rails-next | |
push: true | |
tags: ghcr.io/zooniverse/talk-api:${{ github.sha }}-next | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Modify & apply template | |
run: | | |
sed "s/__IMAGE_TAG__/${{ github.sha }}/g" ./kubernetes/deployment-staging-canary.tmpl \ | |
| kubectl apply -f - |