Skip to content

Merge branch 'main' into green #2

Merge branch 'main' into green

Merge branch 'main' into green #2

name: branch-builds
on:
push:
branches-ignore:
- main
jobs:
security:
name: gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Notify
if: always()
uses: ravsamhq/notify-slack-action@v1
with:
status: ${{ job.status }}
notify_when: 'failure'
notification_title: '{workflow} has {status_message}'
message_format: ':warning: @devops LEAKED SECRETS in *{workflow}* (<{repo_url}|{repo}>)'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
build-check-push-image:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./application
needs: [ security ]
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v5
id: build
with:
context: "{{defaultContext}}:application"
tags: dvdty/branch-deploy-application:${{ github.head_ref || github.ref_name }}
load: true
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:application"
push: true
tags: dvdty/branch-deploy-application:${{ github.head_ref || github.ref_name }}