-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Public docker image to Github Container Registry
- Loading branch information
1 parent
d3c0b76
commit b8d5839
Showing
2 changed files
with
36 additions
and
1 deletion.
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,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 |
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