Merge pull request #95 from scientist-softserv/add-testing-admin-user #85
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: Containers | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- | |
name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Build and push app | |
id: app_build | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: ghcr.io/lbcclib/community_archive/app:${{ github.sha }} | |
file: .docker/Dockerfile.app | |
- | |
name: Build and push worker | |
id: worker_build | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: ghcr.io/lbcclib/community_archive/worker:${{ github.sha }} | |
file: .docker/Dockerfile.worker | |
deploy-staging: | |
needs: build | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
env: | |
BUNDLE_WITH: deployment_script | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- uses: azure/setup-kubectl@v1 | |
- name: Login via Az module | |
uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Log in to AKS | |
run: az aks get-credentials --name ${{ secrets.K8S_CLUSTER_NAME }} --resource-group ${{ secrets.K8S_CLUSTER_RG }} | |
- uses: azure/setup-helm@v1 | |
with: | |
version: v3.6.3 | |
- name: Set up dotenv file | |
run: | | |
echo SMTP_ADDRESS=${{ secrets.SMTP_ADDRESS }} >> .env | |
echo SMTP_PASS=${{ secrets.SMTP_PASS }} >> .env | |
echo SMTP_PORT=${{ secrets.SMTP_PORT }} >> .env | |
echo SMTP_USER=${{ secrets.SMTP_USER }} >> .env | |
echo GOOGLE_DRIVE_API_CLIENT_ID=${{ secrets.GOOGLE_DRIVE_API_CLIENT_ID }} >> .env | |
echo GOOGLE_DRIVE_API_CLIENT_SECRET=${{ secrets.GOOGLE_DRIVE_API_CLIENT_SECRET }} >> .env | |
- name: Run deploy script | |
run: bundle exec ruby .helm/deploy.rb upgrade ${{ github.sha }} |