diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3d1783d --- /dev/null +++ b/.github/workflows/release.yml @@ -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