Bump nwtgck/actions-netlify from 2.0 to 2.1 (#5152) #1
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: Build and Publish Docker Image | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "*" | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build-and-publish: | |
name: Build and Publish Docker Image | |
runs-on: ubuntu-20.04 | |
# For Pull Requests, only runs from `docker` | |
if: github.event_name == 'push' || | |
( github.event_name == 'pull_request' && | |
github.event.pull_request.head.repo.full_name == github.repository && | |
startsWith(github.event.pull_request.head.ref, 'docker') | |
) | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Create PyVista package | |
run: | | |
pip install build | |
python -m build --sdist | |
- name: Log into the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: token | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata for the Jupyter Docker image | |
id: jupyter_meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- name: Build and push the Jupyter Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: docker/jupyter.Dockerfile | |
push: ${{ github.actor != 'dependabot[bot]' }} | |
tags: ${{ steps.jupyter_meta.outputs.tags }} | |
labels: ${{ steps.jupyter_meta.outputs.labels }} | |
- name: Extract metadata for the Slim Docker image | |
id: slim_meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
flavor: | | |
latest=auto | |
suffix=-slim,onlatest=true | |
- name: Build and push the Slim Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: docker/slim.Dockerfile | |
push: ${{ github.actor != 'dependabot[bot]' }} | |
tags: ${{ steps.slim_meta.outputs.tags }} | |
labels: ${{ steps.slim_meta.outputs.labels }} |