Skip to content

migrate to slog

migrate to slog #268

name: Publish web Docker image
on:
push:
branches:
- kafka
paths-ignore:
- '**/README.md'
pull_request:
branches:
- '**'
jobs:
push_to_registry:
name: Publish Docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.21'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.2
args: --timeout=10m
- name: Go Test
run: make test
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v3
with:
images: minghsu0107/random-chat-web
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
build-args: VERSION=${{ github.ref_name }}
file: ./build/Dockerfile.web
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}