Skip to content

Commit

Permalink
Put docker image on the GitHub Container Registory
Browse files Browse the repository at this point in the history
fix: #9

Squashed commit of the following:

commit a4dd50527cf5a8855c94efc0949a47da5f90d25c
Author: Kyoichiro Yamada <me@kyoh86.dev>
Date:   Sat Nov 14 17:55:33 2020 +0900

    release step

commit 2f841cf
Author: Kyoichiro Yamada <me@kyoh86.dev>
Date:   Sat Nov 14 17:51:59 2020 +0900

    remove unused setup-go

commit 49b7b77
Author: Kyoichiro Yamada <me@kyoh86.dev>
Date:   Sat Nov 14 17:43:01 2020 +0900

    wip: try to build image
  • Loading branch information
kyoh86 committed Nov 14, 2020
1 parent 4c14295 commit 73a39f7
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,20 @@ jobs:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}

- 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
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/git-vertag:latest
ghcr.io/${{ github.repository_owner }}/git-vertag:${{ github.event.tag_name }}
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,30 @@ jobs:
name: repository
path: .

docker:
runs-on: ubuntu-latest
needs: vendor
steps:
- uses: actions/download-artifact@v2
with:
name: repository
path: .
- 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
uses: docker/build-push-action@v2
with:
context: .
push: false
tags: |
ghcr.io/${{ github.repository_owner }}/git-vertag:${{ github.sha }}
lint:
runs-on: ubuntu-latest
needs: vendor
Expand Down

0 comments on commit 73a39f7

Please sign in to comment.