chore(deps): update dependency black to v23.12.0 #325
Workflow file for this run
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: Docker | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- "dockerfiles/**" | |
- "pyrovelocity/**" | |
- "pyproject.toml" | |
- "poetry.lock" | |
# branches: | |
# - 'master*' | |
env: | |
REGISTRY: ghcr.io | |
GAR_REGISTRY: us-central1-docker.pkg.dev | |
GAR_REPOSITORY: pyrovelocity | |
IMAGE_NAME: ${{ github.repository }} | |
CONDA_IMAGE_NAME: pyrovelocitygpu | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: "Print github context" | |
run: | | |
echo " EVENT_NAME:" "$GITHUB_EVENT_NAME" | |
echo " REF:" "$GITHUB_REF" | |
echo " full_name: ${{ github.event.repository.full_name }}" | |
echo " repository: ${{ github.repository }}" | |
echo "repository_owner: ${{ github.repository_owner }}" | |
echo " default_branch: ${{ github.event.repository.default_branch }}" | |
echo "REPOSITORY_OWNER:" "$GITHUB_REPOSITORY_OWNER" | |
echo " REF_NAME:" "$GITHUB_REF_NAME" | |
echo " HEAD_REF:" "$GITHUB_HEAD_REF" | |
echo " BASE_REF:" "$GITHUB_BASE_REF" | |
echo " SHA:" "$GITHUB_SHA" | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
# with: | |
# driver-opts: | | |
# image=moby/buildkit:v0.10.6 | |
- name: Log in to container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract github metadata for docker labels | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./dockerfiles/Dockerfile | |
platforms: linux/amd64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-and-push-conda-image: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: "Print github context" | |
run: | | |
echo " EVENT_NAME:" "$GITHUB_EVENT_NAME" | |
echo " REF:" "$GITHUB_REF" | |
echo " full_name: ${{ github.event.repository.full_name }}" | |
echo " repository: ${{ github.repository }}" | |
echo "repository_owner: ${{ github.repository_owner }}" | |
echo " default_branch: ${{ github.event.repository.default_branch }}" | |
echo "REPOSITORY_OWNER:" "$GITHUB_REPOSITORY_OWNER" | |
echo " REF_NAME:" "$GITHUB_REF_NAME" | |
echo " HEAD_REF:" "$GITHUB_HEAD_REF" | |
echo " BASE_REF:" "$GITHUB_BASE_REF" | |
echo " SHA:" "$GITHUB_SHA" | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to GitHub container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Log in to Google Artifact Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.GAR_REGISTRY }} | |
username: _json_key | |
password: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_DATA }} | |
- name: Extract github metadata for docker labels | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.CONDA_IMAGE_NAME }} | |
${{ env.GAR_REGISTRY }}/${{ secrets.GCP_PROJECT_ID }}/${{ env.GAR_REPOSITORY }}/${{ env.CONDA_IMAGE_NAME }} | |
tags: | | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=sha,prefix=,format=long | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./dockerfiles/Dockerfile.conda | |
platforms: linux/amd64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |