Bump golang.org/x/net from 0.20.0 to 0.23.0 #123
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: Build | |
on: [push] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
id: go | |
- name: Set up PostgreSQL databases | |
uses: docker://quay.io/acoustid/postgresql:master | |
with: | |
entrypoint: /bin/bash | |
args: ./scripts/dev/create-db.sh | |
env: | |
ACOUSTID_SQL_DIR: database/sql | |
POSTGRES_DB: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
POSTGRES_HOST: postgresql | |
POSTGRES_PORT: 5432 | |
- name: Test | |
run: ./scripts/ci/test.sh | |
env: | |
ACOUSTID_TEST_POSTGRESQL_HOST: localhost | |
ACOUSTID_TEST_POSTGRESQL_PORT: ${{ job.services.postgresql.ports[5432] }} | |
ACOUSTID_TEST_POSTGRESQL_USERNAME: acoustid | |
ACOUSTID_TEST_POSTGRESQL_PASSWORD: acoustid | |
ACOUSTID_TEST_REDIS_HOST: localhost | |
ACOUSTID_TEST_REDIS_PORT: ${{ job.services.redis.ports[6379] }} | |
- name: Build binaries | |
run: ./scripts/ci/build.sh | |
- name: Upload binaries | |
uses: actions/upload-artifact@v1 | |
with: | |
name: dist | |
path: dist | |
services: | |
redis: | |
image: redis:alpine | |
ports: | |
- 6379/tcp | |
postgresql: | |
image: quay.io/acoustid/postgresql:master | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
ports: | |
- 5432/tcp | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
docker: | |
name: Build Docker images | |
runs-on: ubuntu-22.04 | |
needs: build | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Download binaries | |
uses: actions/download-artifact@v1 | |
with: | |
name: dist | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to the Container registry | |
if: github.event_name != 'pull_request' && github.actor != 'dependabot[bot]' | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/acoustid/go-acoustid | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |