forked from CatimaLoyalty/Android
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 776 Bytes
/
Copy pathdeploy.yml
File metadata and controls
35 lines (30 loc) · 776 Bytes
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
name: Build and Publish Image
on:
push:
branches:
- "master"
permissions:
contents: read
packages: write
attestations: write
id-token: write
jobs:
build-publish-dev-image:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
- name: Force Fetch
run: |
git fetch --prune --unshallow --tags
- name: Set git tag and SHA
run: |
VERSION=$(git tag --sort=committerdate | grep -E '[0-9]' | tail -1 | cut -b 1-7)
SHORT_SHA=${GITHUB_SHA:0:7}
TAG="${VERSION}-${SHORT_SHA}"
echo "TAG=${TAG}" >> $GITHUB_ENV
- name: Echo Git Tag
run: |
echo ${{ env.TAG }}