-
Notifications
You must be signed in to change notification settings - Fork 197
90 lines (85 loc) · 2.97 KB
/
release-test-lihi.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
# This workflow is triggered whenever we release a new version of Starboard
# by creating an annotated Git tag and pushing it to the upstream Git repository.
#
# git tag -a v0.0.1 -m 'Release v0.0.1'
# git push upstream v0.0.1
name: Release
on:
push:
branches:
- lihitest-release-*
env:
GO_VERSION: "1.23.1"
KIND_VERSION: "v0.11.1"
KIND_IMAGE: "kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6"
jobs:
release:
name: Release-Test-Lihi
runs-on: ubuntu-20.04
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- name: login to azure acr - Lihitest2
uses: azure/docker-login@v2
with:
login-server: ${{ secrets.AQUSEC_ACR_REGISTRY_NAME }}
username: ${{ secrets.AQUASEC_ACR_USERNAME }}
password: ${{ secrets.AQUASEC_ACR_PASSWORD }}
- name: Cleanup Docker and KIND resources (Pre-Release)
run: |
docker system prune -a --force
docker volume prune --force
- name: Check disk usage (Pre-Release)
run: df -h
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
# - name: login to azure acr - Lihitest2
# uses: azure/docker-login@v2
# with:
# login-server: ${{ env.AQUSEC_ACR_REGISTRY_NAME }}
# username: ${{ env.AQUASEC_ACR_USERNAME }}
# password: ${{ env.AQUASEC_ACR_PASSWORD }}
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
# - name: Login to docker.io registry
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USER }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Release
uses: goreleaser/goreleaser-action@v3
with:
version: v1.7.0
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Update new version for plugin 'starboard' in krew-index
# uses: rajatjindal/krew-release-bot@v0.0.43
# - name: Tag and push image to Amazon ECR
# id: build-image
# env:
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
# IMAGE_TAG: ${{ github.sha }}
# run: |
# # push to ECR
# docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG_ECR
# docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
# echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
- name: Cleanup Docker and KIND resources
run: |
docker system prune -a --force
docker volume prune --force
- name: Check disk usage
run: df -h