-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (47 loc) · 1.4 KB
/
ci.yaml
File metadata and controls
55 lines (47 loc) · 1.4 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
name: release-buildx
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.1
- uses: actions/setup-go@v5.5.0
with:
go-version: "1.22.10"
- uses: golangci/golangci-lint-action@v8.0.0
with:
version: v2.1.6
args: --timeout=10m
- run: make test
buildx:
runs-on: ubuntu-latest
needs:
- test
if: github.event_name != 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v4.2.1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Create tag for Docker image
uses: Surgo/docker-smart-tag-action@v1
id: smarttag
with:
docker_image: tsuru/rate-limit-control-plane
default_branch: main
tag_with_sha: "true"
- name: Build and push Docker image
uses: docker/build-push-action@v4
if: github.event_name != 'pull_request'
with:
push: true
tags: ${{ steps.smarttag.outputs.tag }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
platforms: linux/amd64