Skip to content

OPT: Bump brakeman from 6.2.2 to 7.0.0 #1104

OPT: Bump brakeman from 6.2.2 to 7.0.0

OPT: Bump brakeman from 6.2.2 to 7.0.0 #1104

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
tag:
name: "Tag: Production"
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_tag.yml@v0
concurrency:
group: tag
cancel-in-progress: false
with:
reference: ${{ github.sha }}
release:
name: Release
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_release.yml@v0
secrets: inherit
needs:
- tag
with:
tag: ${{needs.tag.outputs.version}}
reference: ${{ github.sha }}
build_development:
name: Build
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_docker.yml@v0
secrets: inherit
concurrency:
group: build-development
cancel-in-progress: true
with:
name: Development
target: development
image: "gmmcal/gmmcal:development"
build_production:
name: Build
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_docker.yml@v0
needs:
- tag
- release
secrets: inherit
concurrency:
group: build-production
cancel-in-progress: true
with:
name: Production
target: production
reference: ${{needs.tag.outputs.version}}
image: "gmmcal/gmmcal:production"
deploy:
name: Deploy
runs-on: ubuntu-latest
concurrency:
group: release
environment:
name: production
url: https://www.gustavocunha.dev
needs:
- tag
- release
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{needs.tag.outputs.version}}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
log-public-key: false
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- name: Install Kamal
run: gem install kamal -v 2.2.0 # lock version because of kamal proxy. Maybe consider adding kamal as a project dependency on a deploy group that will be installed on this action
- name: Deploy command
run: kamal deploy --version=${{needs.tag.outputs.version}}
env:
KAMAL_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
DATABASE_HOST: ${{ secrets.DATABASE_HOST }}
DATABASE_USERNAME: ${{ secrets.POSTGRES_USER }}
DATABASE_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
# db setup
POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}