Repository navigation
57 lines (53 loc) · 1.58 KB
/
Copy pathpr-github-sync.yml
File metadata and controls
57 lines (53 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: PR GitHub Sync
on:
pull_request:
paths:
- 'github-sync-go/**'
- '.github/workflows/pr-github-sync.yml'
permissions:
contents: read
jobs:
go:
name: Go checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-go@v5
with:
go-version-file: github-sync-go/go.mod
cache-dependency-path: github-sync-go/go.mod
- name: Test and vet
working-directory: github-sync-go
run: |
go test -count=1 ./...
go vet ./...
image:
name: Image (${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: docker/setup-buildx-action@v3
- name: Build image
uses: docker/build-push-action@v6
with:
context: github-sync-go
platforms: linux/${{ matrix.arch }}
tags: skillhub-github-sync-pr:${{ matrix.arch }}-${{ github.sha }}
load: true
- name: Check runtime tools and user
run: |
docker run --rm --platform linux/${{ matrix.arch }} \
--entrypoint sh skillhub-github-sync-pr:${{ matrix.arch }}-${{ github.sha }} \
-ec 'test "$(id -u)" = 10001; git --version >/dev/null; tini --version >/dev/null; test -x /usr/local/bin/github-sync'