Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/deploy-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ name: Deploy All Images
env:
REGISTRY: ghcr.io
IMAGE_NAME: numerai_predict
MODEL_UPLOADS_ECR_ACCOUNT_ID: ${{ github.ref == 'refs/heads/staging' && secrets.MODEL_UPLOADS_STAGING_ACCOUNT_ID || secrets.MODEL_UPLOADS_ACCOUNT_ID }}

on:
workflow_dispatch:
push:
branches:
- master
- staging

jobs:
public-images:
if: github.ref == 'refs/heads/master'
strategy:
matrix:
python-version: ['3{0}10', '3{0}11', '3{0}12', '3{0}13']
Expand Down Expand Up @@ -63,6 +66,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}

internal-images:
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/staging'
strategy:
matrix:
python-version: ['3{0}10', '3{0}11', '3{0}12', '3{0}13']
Expand All @@ -76,7 +80,7 @@ jobs:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.MODEL_UPLOADS_ACCOUNT_ID }}:role/github-actions
role-to-assume: arn:aws:iam::${{ env.MODEL_UPLOADS_ECR_ACCOUNT_ID }}:role/github-actions
aws-region: us-west-2

- name: Set up QEMU
Expand All @@ -86,4 +90,4 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Build and Push Docker Image
run: ACCOUNT_ID=${{ secrets.MODEL_UPLOADS_ACCOUNT_ID }} make push_latest_${{ format(matrix.python-version, '_') }}
run: ACCOUNT_ID=${{ env.MODEL_UPLOADS_ECR_ACCOUNT_ID }} make push_latest_${{ format(matrix.python-version, '_') }}
9 changes: 6 additions & 3 deletions .github/workflows/deploy-shell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ name: Deploy Shell Image (3.11 only)
env:
REGISTRY: ghcr.io
IMAGE_NAME: numerai_predict
MODEL_UPLOADS_ECR_ACCOUNT_ID: ${{ github.ref == 'refs/heads/staging' && secrets.MODEL_UPLOADS_STAGING_ACCOUNT_ID || secrets.MODEL_UPLOADS_ACCOUNT_ID }}

on:
workflow_dispatch:
push:
branches:
- master
- staging

jobs:
public-py311-image:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest-4core
permissions:
packages: write
Expand All @@ -34,7 +37,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}_shell

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand Down Expand Up @@ -70,8 +73,8 @@ jobs:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.MODEL_UPLOADS_ACCOUNT_ID }}:role/github-actions
role-to-assume: arn:aws:iam::${{ env.MODEL_UPLOADS_ECR_ACCOUNT_ID }}:role/github-actions
aws-region: us-west-2

- name: Build and Push Docker Image
run: ACCOUNT_ID=${{ secrets.MODEL_UPLOADS_ACCOUNT_ID }} make push_latest_shell
run: ACCOUNT_ID=${{ env.MODEL_UPLOADS_ECR_ACCOUNT_ID }} make push_latest_shell
Loading