Skip to content

Commit

Permalink
Public docker image to Github Container Registry
Browse files Browse the repository at this point in the history
  • Loading branch information
yamamoto-febc committed Feb 26, 2022
1 parent d3c0b76 commit b8d5839
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/publish_docker_image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# from https://docs.github.com/en/free-pro-team@latest/actions/guides/publishing-docker-images#publishing-images-to-github-packages
name: Publish Docker image
on:
push:
tags: 'v[0-9]+.[0-9]+.[0-9]+*'
jobs:
push_to_registry:
name: Push Docker image to GitHub Container Registry(latest)
runs-on: ubuntu-latest
steps:
-
name: Check out the repo
uses: actions/checkout@v2
-
name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: ghcr.io/sacloud/textlint-action
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
-
name: Build and push to GitHub Container Registry
uses: docker/build-push-action@v2
with:
tags: ${{ steps.docker_meta.outputs.tags }},ghcr.io/sacloud/textlint-action:latest
push: true
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ inputs:
default: '.'
runs:
using: 'docker'
image: 'Dockerfile'
image: 'ghcr.io/sacloud/textlint-action:v0.0.1'
args:
- ${{ inputs.working-directory}}

0 comments on commit b8d5839

Please sign in to comment.