chore(deps): bump golang.org/x/crypto from 0.21.0 to 0.31.0 #188
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: Test and build container image | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- 'v*' | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- '**.md' | |
jobs: | |
json-validate: | |
name: Validate JSON/YML files | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: json-yaml-validate | |
uses: GrantBirki/json-yaml-validate@v2 | |
with: | |
mode: fail | |
test-backend: | |
name: Test backend | |
runs-on: ubuntu-22.04 | |
env: | |
EBUILD_LOG_LEVEL: "debug" | |
EBUILD_DATABASE_DSN: "host=localhost user=edgetx password=psw dbname=cloudbuild port=5432 sslmode=disable" | |
services: | |
postgres: | |
image: postgres:13.3 | |
env: | |
POSTGRES_USER: edgetx | |
POSTGRES_DB: cloudbuild | |
POSTGRES_PASSWORD: psw | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.20.0 | |
id: go | |
- name: Lint | |
run: make lint | |
- name: Test | |
run: make test | |
test-frontend: | |
name: Test frontend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18.x" | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Install | |
run: npm install --prefix ui/ | |
- name: Lint | |
run: npm run lint --prefix ui/ | |
build: | |
runs-on: ubuntu-latest | |
needs: [ test-backend, test-frontend ] | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
name=ghcr.io/edgetx/cloudbuild | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push cloudbuild | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./ | |
file: ./Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |