-
Notifications
You must be signed in to change notification settings - Fork 10
47 lines (41 loc) · 1.34 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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