This repository was archived by the owner on Jan 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
62 lines (51 loc) · 1.66 KB
/
pull_request.yaml
File metadata and controls
62 lines (51 loc) · 1.66 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
58
59
60
61
62
name: Pull Request
on:
pull_request:
branches:
- main
jobs:
build:
name: Build and Deploy
runs-on: ubuntu-latest
env:
BUILD_METADATA: build.${{ github.run_number }}
GIT_COMMIT: ${{ github.sha }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: KinD (Kubernetes in Docker) Initialization
uses: helm/kind-action@v1.1.0
with:
version: v0.11.1
wait: 0s
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
cache: true
- name: Set up GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
install-only: true
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: '${{ github.actor }}'
password: '${{ github.token }}'
- name: Build and push controller
run: |
export IMG="ghcr.io/thestormforge/optimize-controller:sha-$(git rev-parse --short HEAD)"
export SETUPTOOLS_IMG="ghcr.io/thestormforge/setuptools:sha-$(git rev-parse --short HEAD)"
export PULL_POLICY=""
make docker-build
make docker-push
skopeo copy "docker://${IMG}" "docker://${IMG%%:*}:pr-${{ github.event.number }}"
skopeo copy "docker://${SETUPTOOLS_IMG}" "docker://${SETUPTOOLS_IMG%%:*}:pr-${{ github.event.number }}"
echo "IMG=${IMG}" >> $GITHUB_ENV
echo "SETUPTOOLS_IMG=${SETUPTOOLS_IMG}" >> $GITHUB_ENV
echo "PULL_POLICY=${PULL_POLICY}" >> $GITHUB_ENV
- name: Run integration tests
run: |
make cli
hack/integration.sh