forked from getporter/porter
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.08 KB
/
integ-reuseable-workflow.yml
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
name: integ reusable workflow
on:
workflow_call:
inputs:
test_name:
type: string
required: true
registry:
type: string
default: ghcr.io
env:
GOVERSION: 1.21.3
PORTER_INTEG_FILE: ${{inputs.test_name}}.go
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4.1.0
- uses: actions/setup-go@v4
with:
go-version: "${{ env.GOVERSION }}"
cache: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
- name: Docker Login
uses: docker/login-action@v3.0.0
with:
registry: ${{inputs.registry}}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Agent
run: go run mage.go build
shell: bash
- name: Integration Test
run: go run mage.go -v TestIntegration
shell: bash