Skip to content

https to reactors

https to reactors #102

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- '*'
tags:
- 'v*'
create:
tags:
- 'v*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true
- name: Start TiKV with Docker Compose
run: docker compose up -d
- name: Run tests
run: go test -v ./...
env:
TIKV_PD_ENDPOINTS: "127.0.0.1:2379"
- name: Cleanup
if: always()
run: docker compose down -v
build-and-push:
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:v0
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest