Skip to content

Docker publish action #145

@wesley-dean

Description

@wesley-dean

While scanning through j2lint's workflows, I saw that the release action has the Docker publishing steps commented out:

# TODO: in a separate PR
# docker:
# name: Docker Image Build
# runs-on: ubuntu-latest
# needs: [pypi]
# strategy:
# matrix:
# platform:
# - linux/amd64
# - linux/arm64
# - linux/arm/v7
# - linux/arm/v8
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Docker meta for TAG
# id: meta
# uses: docker/metadata-action@v5
# with:
# images: ghcr.io/${{ github.repository }}
# tags: |
# type=semver,pattern={{version}}
# type=raw,value=latest
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build and push
# uses: docker/build-push-action@v6
# with:
# context: .
# file: Dockerfile
# push: true
# platforms: linux/amd64
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}

I happen to maintain a workflow that does exactly what's being done there: https://github.com/marketplace/actions/publish-image

Example: https://github.com/wesley-dean/jinja2-cli/blob/master/.github/workflows/build_docker_image.yml

I see PR #5 includes a Dockerfile, so that (or something like it) would need to be included so that the aforementioned workflow would be able to build.

I can put together a PR for the workflow if that's of any interest.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions