Skip to content

Merge pull request #14 from felipe-mlopes/feature #23

Merge pull request #14 from felipe-mlopes/feature

Merge pull request #14 from felipe-mlopes/feature #23

Workflow file for this run

name: Deploy
on:
push:
branches: ['main']
workflow_run:
workflows: ['Run E2E Tests']
types:
- completed
jobs:
ci:
if: github.event_name == 'push' || github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- name: Generate tag
id: generate_tag
run: |
SHA=$(echo $GITHUB_SHA | head -c7)
echo "sha=$SHA" >> $GITHUB_OUTPUT
- name: Login into the container registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v5
with:
push: true
tags: felipemlp/fast-feet-api:${{ steps.generate_tag.outputs.sha }},felipemlp/fast-feet-api:latest
- name: Render Deploy Action
uses: bounceapp/render-action@0.6.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
service-id: ${{ secrets.SERVICE_ID }}