Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hayato24s committed May 4, 2023
1 parent 05f1f6a commit 9e1e262
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: release image
on:
release:
types: [published]
jobs:
push-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}
- name: Set Tag Name
run: echo "TAG_NAME=ghcr.io/twin-te/user-service:${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build
run: docker build . -t $TAG_NAME
- name: Push
run: docker push $TAG_NAME

0 comments on commit 9e1e262

Please sign in to comment.