-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.11 KB
/
release.yml
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
name: Testing bump version backend.
on:
push:
branches: [trunk]
paths: ["backend/**"]
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Bump version
id: version-bump
uses: 'phips28/[email protected]'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag-prefix: 'backend/'
PACKAGEJSON_DIR: 'backend'
commit-message: 'chore(release): bump version'
- name: Create image tags
id: meta
run: |
version=$(echo ${{ steps.version-bump.outputs.newTag }} | cut -d 'v' -f2)
tag1="sjakusch/steam-game-stats-backend:${version}"
tag2="sjakusch/steam-game-stats-backend:latest"
echo "tags=${tag1},${tag2}" >> "$GITHUB_OUTPUT"
- name: Build and push
uses: docker/build-push-action@v4
with:
# push only if master is updated
push: ${{ github.ref == 'refs/heads/master' }}
file: backend/Dockerfile
tags: ${{ steps.meta.outputs.tags }}