Skip to content

fix: target branch v2 #96

fix: target branch v2

fix: target branch v2 #96

Workflow file for this run

on:
push:
branches:
- v2
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.RELEASE_PLEASE_PAT }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
target-branch: v2
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- name: Get Docker image tag
id: get-tag
run: |
version=$(echo "${{ steps.release.outputs.tag_name }}" | sed -e "s/^v//")
echo "tag=$version" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
if: ${{ steps.release.outputs.release_created }}
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: ${{ steps.release.outputs.release_created }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
if: ${{ steps.release.outputs.release_created }}
uses: docker/build-push-action@v5
with:
push: true
tags: mdshack/shotshare:${{ steps.get-tag.outputs.tag }}
cache-from: type=registry,ref=mdshack/shotshare:latest
cache-to: type=inline
file: ./.docker/Dockerfile