Skip to content

Commit

Permalink
add in runner release target (#75)
Browse files Browse the repository at this point in the history
Co-authored-by: Luke Lombardi <[email protected]>
  • Loading branch information
luke-lombardi and Luke Lombardi authored Jan 27, 2024
1 parent 11ad80b commit 8cb5804
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-gateway.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Push Gateway
name: Build and release Gateway

on:
release:
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/release-runner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build and release Runner

on:
release:
types: [created]
tags:
- 'runner-*'

jobs:
build_and_release_runner:
environment: Release
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['py38', 'py39', 'py310', 'py311']

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to Amazon ECR
uses: aws-actions/amazon-ecr-login@v2
id: login-ecr
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
with:
mask-password: 'true'
registry-type: public

- name: Extract tag name
run: echo "RUNNER_TAG=${GITHUB_REF#refs/tags/runner-}" >> $GITHUB_ENV

- name: Build and push Docker image for ${{ matrix.python-version }}
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/Dockerfile.runner
push: true
tags: ${{ secrets.ECR_REGISTRY }}/beta9-runner:${{ matrix.python-version }}-${{ env.RUNNER_TAG }}
build-args: |
TARGET=${{ matrix.python-version }}
load: false
registry: ${{ steps.login-ecr.outputs.registry }}
repository: ${{ steps.login-ecr.outputs.registry }}/beta9-runner
add_git_labels: true
tag_with_ref: true
2 changes: 1 addition & 1 deletion .github/workflows/release-worker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Push Worker
name: Build and release Worker

on:
release:
Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile.gateway
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends fuse3 && \
curl -sSL https://d.juicefs.com/install | sh -


# Target used in development environments
FROM base as build

Expand Down

0 comments on commit 8cb5804

Please sign in to comment.