refactor/NR-72 Move manyFromX usage into aggregators (#226) #19
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: Release backend. | |
on: | |
push: | |
branches: [master] | |
paths: ["backend/**"] | |
jobs: | |
release: | |
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: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
file: backend/Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
- name: Deploy on Render | |
env: | |
deploy_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL }} | |
run: | | |
curl "$deploy_url" |