Skip to content

Testing gha setup

Testing gha setup #21

Workflow file for this run

name: Hello World
on: [push]
jobs:
login-to-amazon-ecr:
runs-on: codebuild-holosoma-gpu-build-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
mask-aws-account-id: 'false'
use-existing-credentials: true
role-session-name: gha-${{ github.run_id }}-${{ github.run_attempt }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
# needed to use creds for pulling later
mask-password: 'false'
outputs:
registry: ${{ steps.login-ecr.outputs.registry }}
docker_username: ${{ steps.login-ecr.outputs.docker_username_982423663241_dkr_ecr_us_west_2_amazonaws_com }}
docker_password: ${{ steps.login-ecr.outputs.docker_password_982423663241_dkr_ecr_us_west_2_amazonaws_com }}
run-in-container:
runs-on:
- codebuild-holosoma-gpu-build-${{ github.run_id }}-${{ github.run_attempt }}
needs: login-to-amazon-ecr
container:
image: 982423663241.dkr.ecr.us-west-2.amazonaws.com/holosoma:latest
credentials:
username: ${{ needs.login-to-amazon-ecr.outputs.docker_username }}
password: ${{ needs.login-to-amazon-ecr.outputs.docker_password }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch || 'main' }}
- name: Image check
run: |
whoami
ls -la
ls -la /workspace/holosoma