mirror of
https://github.com/shizunge/endlessh-go.git
synced 2026-06-23 04:10:08 +00:00
637aa0fcc4
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
name: On pull request
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- 'main'
|
|
paths-ignore:
|
|
- 'dashboard/*'
|
|
- 'examples/*'
|
|
- 'README.md'
|
|
- 'LICENSE'
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
PLATFORMS: "linux/amd64,linux/arm64,linux/arm/v7"
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: '1.26.1'
|
|
cache: true
|
|
|
|
- name: Install dependencies
|
|
run: go mod download
|
|
|
|
- name: Run Tests
|
|
run: go test -v ./...
|
|
|
|
build_container_image:
|
|
name: Build Docker image
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v7
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v4
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v4.1.0
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v6
|
|
with:
|
|
images: |
|
|
ghcr.io/${{ github.repository }}-development
|
|
tags: |
|
|
type=raw,value=dev-{{date 'X'}}
|
|
type=raw,value=latest
|
|
type=ref,event=branch
|
|
type=edge,branch=main
|
|
- name: Build
|
|
uses: docker/build-push-action@v7.2.0
|
|
with:
|
|
platforms: ${{ env.PLATFORMS }}
|
|
push: false
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
provenance: false
|
|
|
|
|