forked from kubernetes-sigs/kueue
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
70 additions
and
11 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Build Docker Image | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
repo: | ||
required: true | ||
type: string | ||
tag: | ||
required: false | ||
type: string | ||
default: test$(git rev-parse --short HEAD) | ||
commit: | ||
required: false | ||
type: string | ||
default: $(git rev-parse --short HEAD) | ||
runs-on: | ||
required: false | ||
type: string | ||
default: ubuntu-latest | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ inputs.runs-on }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Install awscli | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install awscli | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-1 | ||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
- name: Build and push the Docker image | ||
env: | ||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | ||
run: | | ||
set -x | ||
docker build . --file Dockerfile \ | ||
--tag ${{ inputs.repo }}:${{ inputs.tag }} \ | ||
--build-arg GIT_COMMIT=${{ inputs.commit }} \ | ||
--build-arg REPO=$ECR_REGISTRY/ecr-public | ||
echo "tagging container image with ${{ inputs.repo }}:${{ inputs.tag }}}" | ||
docker tag ${{ inputs.repo }}:${{ inputs.tag }} $ECR_REGISTRY/${{ inputs.repo }}:${{ inputs.tag }} | ||
docker push $ECR_REGISTRY/${{ inputs.repo }}:${{ inputs.tag }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: lepton-release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
build-release: | ||
uses: ./.github/workflows/lepton-build-image.yaml | ||
secrets: inherit | ||
with: | ||
repo: lepton-kueue | ||
tag: ${GITHUB_REF##*/} | ||
commit: ${GITHUB_REF##*/} |