forked from codeforjapan/decidim-cfj
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 1.01 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
name: Release
permissions: write-all
on:
workflow_call:
outputs:
tag_name:
description: image tag name
value: ${{ jobs.release.outputs.tag_name }}
created:
description: whether release is created or not
value: ${{ jobs.release.outputs.created }}
jobs:
release:
name: Release Please
runs-on: ubuntu-latest
outputs:
created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ env.IMAGE_TAG }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: ruby
- name: Export Released Version for Image Tag
if: ${{ steps.release.outputs.release_created }}
run: |
echo "IMAGE_TAG=${{ steps.release.outputs.tag_name }}" >> $GITHUB_ENV
- name: Export Commit SHA for Image Tag
if: ${{ !steps.release.outputs.release_created }}
run: |
sha=$(echo "${{ github.sha }}" | cut -c1-7)
echo "IMAGE_TAG=$sha" >> $GITHUB_ENV