Skip to content

build(deps): bump github.com/jackc/pgx/v4 from 4.18.1 to 4.18.3 #240

build(deps): bump github.com/jackc/pgx/v4 from 4.18.1 to 4.18.3

build(deps): bump github.com/jackc/pgx/v4 from 4.18.1 to 4.18.3 #240

Workflow file for this run

name: Lint, Build, and Deploy
on:
push:
pull_request:
branches: [ master ]
env:
GO_VERSION: "1.21"
CI_REGISTRY_IMAGE: "${{ secrets.CI_REGISTRY }}/chatwoot"
GHCR_REGISTRY: ghcr.io
GHCR_REGISTRY_IMAGE: "ghcr.io/${{ github.repository }}"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Install libolm
run: sudo apt-get install libolm-dev libolm3
- name: Install goimports
run: |
go install golang.org/x/tools/cmd/goimports@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
export PATH="$HOME/go/bin:$PATH"
- name: Run pre-commit
uses: pre-commit/[email protected]
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Install dependencies
run: sudo apt-get install libolm-dev libolm3
- name: Build
run: go build -v
- uses: actions/upload-artifact@v3
with:
name: chatwoot
path: chatwoot
if-no-files-found: error
build-docker:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Beeper Docker registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.CI_REGISTRY }}
username: ${{ secrets.CI_REGISTRY_USER }}
password: ${{ secrets.CI_REGISTRY_PASSWORD }}
- name: Login to ghcr
uses: docker/login-action@v3
with:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build
uses: docker/build-push-action@v5
with:
cache-from: ${{ env.CI_REGISTRY_IMAGE }}:latest
pull: true
file: Dockerfile
tags: |
${{ env.CI_REGISTRY_IMAGE }}:${{ github.sha }}
${{ env.GHCR_REGISTRY_IMAGE }}:${{ github.sha }}
push: true
deploy-docker:
runs-on: ubuntu-latest
needs:
- lint
- build-docker
if: github.ref == 'refs/heads/master'
steps:
- name: Login to Beeper Docker registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.CI_REGISTRY }}
username: ${{ secrets.CI_REGISTRY_USER }}
password: ${{ secrets.CI_REGISTRY_PASSWORD }}
- name: Login to ghcr
uses: docker/login-action@v3
with:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: beeper/docker-retag-push-latest@main
with:
image: ${{ env.CI_REGISTRY_IMAGE }}
- uses: beeper/docker-retag-push-latest@main
with:
image: ${{ env.GHCR_REGISTRY_IMAGE }}