Skip to content

Merge pull request #108 from bruin-data/ci-release/BRU-1440 #2

Merge pull request #108 from bruin-data/ci-release/BRU-1440

Merge pull request #108 from bruin-data/ci-release/BRU-1440 #2

Workflow file for this run

name: "Release ingestr on pip and ghcr.io"
on:
push:
tags:
- "v*.*.*"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
tests:
uses: ./.github/workflows/tests.yml
pip-release:
runs-on: ubuntu-latest
needs: tests
env:
TWINE_PASSWORD: ${{ secrets.PYPI_INGESTR_TOKEN }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: install uv
run: pip install uv
- name: install dependencies
run: uv pip install -r requirements-dev.txt
- name: build
run: make build
- name: release
run: make upload
docker-release:
needs: tests
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm64/v8
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max