This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 140
70 lines (68 loc) · 1.89 KB
/
release.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Release
on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v1
with:
go-version: '1.16.2'
- run: make test
- uses: golangci/golangci-lint-action@v2
with:
version: v1.29
args: --timeout 5m
env:
GOROOT: ""
- uses: codecov/codecov-action@v1
with:
file: ./coverage.out
publish:
runs-on: ubuntu-latest
steps:
-
name: Checkout repo
uses: actions/checkout@master
-
name: Build image tag
run: echo "IMAGE_TAG=v$(cat ./VERSION)" >> $GITHUB_ENV
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GH_USERNAME }}
password: ${{ secrets.GH_PAT }}
-
name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/arm
push: true
tags: |
argoprojlabs/argocd-notifications:${{ env.IMAGE_TAG }}
ghcr.io/argoproj-labs/argocd-notifications:${{ env.IMAGE_TAG }}
file: ./Dockerfile
build-args: |
IMAGE_TAG=${{ env.IMAGE_TAG }}