-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ Update 2.0 branch workflows (#973)
- Loading branch information
Showing
3 changed files
with
115 additions
and
37 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Publish viadot images with a specified tag. | ||
name: "Publish Docker images" | ||
run-name: "Publish viadot-*:${{ github.event.inputs.tag }} images (@${{ github.actor }})" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: "The tag to use for the image." | ||
required: true | ||
default: "dev" | ||
install_databricks: | ||
description: "Whether to install Databricks source dependencies." | ||
required: false | ||
default: "false" | ||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: all | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log into GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and publish viadot-lite image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: docker/Dockerfile | ||
platforms: linux/amd64 | ||
push: true | ||
target: viadot-lite | ||
tags: ghcr.io/${{ github.repository }}/viadot-lite:${{ github.event.inputs.tag }} | ||
|
||
- name: Build and publish viadot-aws image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: docker/Dockerfile | ||
platforms: linux/amd64 | ||
push: true | ||
target: viadot-aws | ||
tags: ghcr.io/${{ github.repository }}/viadot-aws:${{ github.event.inputs.tag }} | ||
|
||
- name: Build and publish viadot-azure image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: docker/Dockerfile | ||
platforms: linux/amd64 | ||
push: true | ||
target: viadot-azure | ||
tags: ghcr.io/${{ github.repository }}/viadot-azure:${{ github.event.inputs.tag }} | ||
build-args: INSTALL_DATABRICKS=${{ github.event.inputs.install_databricks }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: "Publish to PyPI" | ||
# Publish a viadot branch to PyPI. | ||
# The branch is either picked from the dropdown (if the workflow is ran manually), | ||
# or the branch where the workflow was triggered. | ||
run-name: "Publish viadot to PyPI (@${{ github.actor }})" | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build distribution 📦 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install pypa/build | ||
run: python3 -m pip install build --user | ||
|
||
- name: Build a binary wheel and a source tarball | ||
run: python3 -m build | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
publish: | ||
name: Publish to PyPI 🚀 | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: release | ||
url: https://pypi.org/p/viadot2 | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file was deleted.
Oops, something went wrong.