Skip to content

Commit

Permalink
ci(workflow): streamline release process by reusing shared build work…
Browse files Browse the repository at this point in the history
…flow

refactor(Dockerfile): remove platform specification for broader compatibility
  • Loading branch information
sachincool committed Oct 15, 2024
1 parent ba30720 commit 5e3e0a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 31 deletions.
Binary file added .DS_Store
Binary file not shown.
35 changes: 5 additions & 30 deletions .github/workflows/release-to-jfrog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,16 @@ on:
push:
branches:
- 'main'
- arm-build

permissions:
id-token: write
contents: read

env:
IMAGE_TAG: ${{ github.sha }}
ARTIFACTORY_REGISTRY: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_REGISTRY_URL }}
ARTIFACTORY_USERNAME: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_PASSWORD }}
ARTIFACTORY_REPOSITORY_URL: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_REPOSITORY }}/async_processor

jobs:
build:
name: Build Image
runs-on: ubuntu-latest
steps:
- name: Checkoutout code
uses: actions/checkout@v4

- name: Log in to JFrog Artifactory
uses: docker/login-action@v3
with:
username: ${{ env.ARTIFACTORY_USERNAME }}
password: ${{ env.ARTIFACTORY_PASSWORD }}
registry: ${{ env.ARTIFACTORY_REGISTRY }}

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

- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ env.ARTIFACTORY_REPOSITORY_URL }}:${{ env.IMAGE_TAG }}
cache-from: type=registry,ref=${{ env.ARTIFACTORY_REPOSITORY_URL }}:buildcache
cache-to: mode=max,image-manifest=true,type=registry,ref=${{ env.ARTIFACTORY_REPOSITORY_URL }}:buildcache
uses: truefoundry/workflows/.github/workflows/build.yml@main
secrets: inherit
with:
internal: false
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 python:3.9-slim
FROM python:3.9-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN python -m pip install -U pip setuptools wheel poetry
WORKDIR /code
Expand Down

0 comments on commit 5e3e0a1

Please sign in to comment.