|
4 | 4 | push: |
5 | 5 | branches: |
6 | 6 | - main |
| 7 | + paths-ignore: |
| 8 | + - '**.md' |
7 | 9 | pull_request: |
| 10 | + paths-ignore: |
| 11 | + - '**.md' |
8 | 12 | env: |
9 | 13 | # Default minimum version of Go to support. |
10 | 14 | DEFAULT_GO_VERSION: 1.18 |
|
68 | 72 | steps: |
69 | 73 | - name: Checkout |
70 | 74 | uses: actions/checkout@v3 |
71 | | - with: |
72 | | - submodules: recursive |
73 | 75 | - name: Set up QEMU |
74 | 76 | uses: docker/setup-qemu-action@master |
75 | 77 | with: |
|
80 | 82 | - name: Build |
81 | 83 | uses: docker/build-push-action@v3 |
82 | 84 | with: |
| 85 | + builder: ${{ steps.buildx.outputs.name }} |
83 | 86 | context: . |
84 | 87 | outputs: type=docker,dest=${{ github.workspace }}/open-feature-operator-local.tar |
85 | | - tags: open-feature-operator-local:test |
| 88 | + tags: open-feature-operator-local:${{ github.sha }} |
86 | 89 | - name: Run Trivy vulnerability scanner |
87 | 90 | uses: aquasecurity/trivy-action@master |
88 | 91 | with: |
|
95 | 98 | uses: github/codeql-action/upload-sarif@v2 |
96 | 99 | with: |
97 | 100 | sarif_file: "trivy-results.sarif" |
| 101 | + - name: Upload image as artifact |
| 102 | + uses: actions/upload-artifact@v3 |
| 103 | + with: |
| 104 | + name: open-feature-operator-local-${{ github.sha }} |
| 105 | + path: ${{ github.workspace }}/open-feature-operator-local.tar |
| 106 | + |
| 107 | + e2e-test: |
| 108 | + runs-on: ubuntu-latest |
| 109 | + needs: docker-local |
| 110 | + steps: |
| 111 | + - name: Install Go |
| 112 | + uses: actions/setup-go@v3 |
| 113 | + with: |
| 114 | + go-version: ${{ env.DEFAULT_GO_VERSION }} |
| 115 | + - name: Checkout |
| 116 | + uses: actions/checkout@v3 |
| 117 | + - name: Download image |
| 118 | + uses: actions/download-artifact@v3 |
| 119 | + with: |
| 120 | + name: open-feature-operator-local-${{ github.sha }} |
| 121 | + path: ${{ github.workspace }} |
| 122 | + - name: Load open-feature-operator image into docker |
| 123 | + run: | |
| 124 | + docker load --input ${{ github.workspace }}/open-feature-operator-local.tar |
| 125 | + - name: Create k8s Kind Cluster |
| 126 | + |
| 127 | + with: |
| 128 | + config: ./test/e2e/kind-cluster.yml |
| 129 | + cluster_name: open-feature-operator-test |
| 130 | + - name: Load open-feature-operator image into Kind cluster |
| 131 | + run: | |
| 132 | + kind load docker-image open-feature-operator-local:${{ github.sha }} --name open-feature-operator-test |
| 133 | + - name: Run e2e test |
| 134 | + run: | |
| 135 | + IMG=open-feature-operator-local:${{ github.sha }} make deploy-operator |
| 136 | + IMG=open-feature-operator-local:${{ github.sha }} make e2e-test |
0 commit comments