merged hotfix changes back to staging #26
Workflow file for this run
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
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- '.github/workflows/manifests/development/adjustedBaseImage/*' | |
jobs: | |
update-worker-image: | |
name: update ocpu base image if needed | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
env: | |
GH_BRANCH: ${{ github.ref_name }} | |
NAMESPACE: development | |
GH_SHA: ${{ github.sha }} | |
APP: opencpu-adjusted | |
REGISTRY: ${{ secrets.ACR_NAME }}.azurecr.io | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
with: | |
ref: 'development' | |
- name: Construct image ref | |
run: echo "IMAGE_REF=${REGISTRY}/${GITHUB_REPOSITORY,,}/${APP}:$(cat ${APP}/VERSION)" >> $GITHUB_ENV | |
# - name: Set up kubelogin for non-interactive login | |
# run: | | |
# curl -LO https://github.com/Azure/kubelogin/releases/download/v0.0.9/kubelogin-linux-amd64.zip | |
# sudo unzip -j kubelogin-linux-amd64.zip -d /usr/local/bin | |
# rm -f kubelogin-linux-amd64.zip | |
# kubelogin --version | |
# - name: Install Azure cli | |
# run: | | |
# sudo apt-get install ca-certificates curl apt-transport-https lsb-release gnupg | |
# curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null | |
# AZ_REPO=$(lsb_release -cs) | |
# echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | sudo tee /etc/apt/sources.list.d/azure-cli.list | |
# sudo apt-get update | |
# sudo apt-get install azure-cli | |
- name: Azure Login | |
uses: azure/login@v1 | |
with: | |
creds: "${{ secrets.AZURE_CREDENTIALS }}" | |
- name: Connect to Azure Container Registry (ACR) | |
run: | | |
az acr login --name ${{ secrets.ACR_NAME }} | |
- name: Create opencpu adjusted image based on development | |
if: github.ref_name == 'development' && success() | |
run: | | |
DOCKER_BUILDKIT=1 docker build . -t ${{ secrets.ACR_NAME }}.azurecr.io/ocpu/ocpu-base-image:latest-dev \ | |
--file .github/workflows/manifests/${{ env.GH_BRANCH }}/adjustedBaseImage/Dockerfile | |
docker push ${{ secrets.ACR_NAME }}.azurecr.io/ocpu/ocpu-base-image:latest-dev |