Simplify Spark deps packaging (#114) #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD - Push to master | |
on: | |
push: | |
branches: [ master ] | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.13 | |
- name: Install dependencies | |
run: make setup | |
- name: Run linter | |
run: make lint | |
- name: Run tests | |
run: make test | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
needs: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.13 | |
- name: Install dependencies | |
run: make setup | |
- name: Get package version | |
run: echo "PACKAGE_VERSION=$(poetry version --short)" >> $GITHUB_ENV | |
- name: Create Github release | |
uses: "marvinpinto/[email protected]" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
automatic_release_tag: "${{ env.PACKAGE_VERSION }}" | |
files: deps/* | |
- name: Log in to the Github 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: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |