fix: trigger release trunk pipeline #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |