Skip to content

Commit

Permalink
/deploy sit
Browse files Browse the repository at this point in the history
  • Loading branch information
sliu008 committed Jan 6, 2025
1 parent be3ee88 commit 2fb70a2
Showing 1 changed file with 8 additions and 32 deletions.
40 changes: 8 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -395,42 +395,18 @@ jobs:
echo "Tags: ${{ steps.meta.outputs.tags }}"
echo "labels: ${{ steps.meta.outputs.labels }}"
- name: Build and push Docker image
if: github.ref == 'refs/heads/develop' ||
github.ref == 'refs/heads/main' ||
startsWith(github.ref, 'refs/heads/release/')
uses: docker/build-push-action@v3
with:
context: .
file: ./docker/lambdaDockerfileArm
push: true
pull: true
tags: |
${{ steps.meta.outputs.tags }}
${{ github.ref_name }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/arm/v7
build-args: |
SOURCE=${{ env.pyproject_name }}==${{ env.the_version }}
cache-from: type=registry,ref=podaac/forge-py:cache
cache-to: type=registry,ref=podaac/forge-py:cache,mode=max

## Local forge-py docker builds

- name: Get Local Forge-py Build
if: |
github.event.head_commit.message == '/deploy sit' ||
github.event.head_commit.message == '/deploy uat' ||
github.event.head_commit.message == '/deploy sandbox'
if: contains(github.event.head_commit.message, '/deploy')
run: |
local_forge_py=$(find dist -type f -name "*.whl")
echo "local_forge_py=${local_forge_py}" >> $GITHUB_ENV
- name: Build Local Forge-py and push Docker image
- name: Build and push Docker image
if: |
github.event.head_commit.message == '/deploy sit' ||
github.event.head_commit.message == '/deploy uat' ||
github.event.head_commit.message == '/deploy sandbox'
github.ref == 'refs/heads/develop' ||
github.ref == 'refs/heads/main' ||
startsWith(github.ref, 'refs/heads/release/') ||
contains(github.event.head_commit.message, '/deploy')
uses: docker/build-push-action@v3
with:
context: .
Expand All @@ -441,7 +417,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/arm/v7
build-args: |
DIST_PATH="dist/"
SOURCE=${{ env.local_forge_py }}
DIST_PATH=${{ contains(github.event.head_commit.message, '/deploy') && 'dist/' || '' }}
SOURCE=${{ env.local_forge_py != '' && env.local_forge_py || format('{0}=={1}', env.pyproject_name, env.the_version) }}
cache-from: type=registry,ref=podaac/forge-py:cache
cache-to: type=registry,ref=podaac/forge-py:cache,mode=max

0 comments on commit 2fb70a2

Please sign in to comment.