Skip to content

Fixing prep release pipeline #58

Fixing prep release pipeline

Fixing prep release pipeline #58

Workflow file for this run

name: Build Python 🐍 distributions 📦 and publish to TestPyPI
on:
push:
tags:
- '[0-9]+.[0-9]+.*[0-9]+*'
pull_request:
env:
AWS_REGION : us-east-1
permissions:
id-token: write
contents: read
jobs:
build-n-publish:
name: Build Python 🐍 distributions 📦 and publish to TestPyPI
runs-on: ubuntu-latest
permissions:
id-token: write
packages: write
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set buildx alias
run: docker buildx install
- name: Install docker pushrm
run: |
sudo wget https://github.com/christian-korneck/docker-pushrm/releases/download/v1.9.0/docker-pushrm_linux_amd64 -O /usr/libexec/docker/cli-plugins/docker-pushrm
sudo chmod +x /usr/libexec/docker/cli-plugins/docker-pushrm
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::904708148714:role/fondant-github-actions
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{env.AWS_REGION}}
- name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Build components
run: ./scripts/build_components.sh -t $GITHUB_SHA
# In case the build runs longer as 1h we need to refresh the token
- name: Refresh login to Amazon ECR Public
id: refresh-ecr-public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Build data explorer
run: ./scripts/build_explorer.sh -t $GITHUB_SHA
- name: Build base image
run: ./scripts/build_base_image.sh -t $GITHUB_SHA
#- name: Update version in pyproject.toml with tag version
# run: sed -i "s/^version = .*/version = '${{github.ref_name}}'/" pyproject.toml
#- name: Build a binary wheel and a source tarball
# run: |
# pip install poetry
# ./scripts/pre-build.sh
# poetry build
#- name: Publish distribution 📦 to Test PyPI
# uses: pypa/[email protected]
# with:
# name: testpypi
# repository_url: https://test.pypi.org/legacy/
# url: https://test.pypi.org/p/fondant