Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Make container image configurable #108

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore build and test binaries.
.git/
.github/
.husky/
bin/
testbin/
6 changes: 6 additions & 0 deletions .earthlyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git/
.github/
.husky/
.vscode/
bin/
kind-logs-*
40 changes: 0 additions & 40 deletions .github/workflows/_docker-build.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/_gocilint.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/_gosecscan.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/_kuttl.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/_test.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/_trivy.yml

This file was deleted.

80 changes: 80 additions & 0 deletions .github/workflows/e2e-on-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# in test don't use yet

name: end-2-end build

on:
pull_request:
branches: [ main ]
workflow_dispatch:

permissions:
contents: read
pull-requests: read
actions: read
security-events: write
packages: write

concurrency:
group: ci-e2e-${{ github.ref }}-1
cancel-in-progress: true

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_TAG: ${{ github.sha }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
security-events: write
packages: write
steps:
- name: harden runner
uses: step-security/harden-runner@9b0655f430fba8c7001d4e38f8d4306db5c6e0ab
with:
egress-policy: audit
- name: checkout repository
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- name: log in to ghrc.io
uses: docker/login-action@1edf6180e07d2ffb423fc48a1a552855c0a1f508
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: restore cache Earthly build
uses: actions/cache/restore@v3
with:
path: /var/lib/docker/volumes/earthly-cache/
key: earthly-cache
- name: run golangci-lint
run: make lint
- name: run gosec scan
run: make gosec
- name: run test
run: make test
- name: run image scan
run: make scan-image
- name: generate bundle manifest
run: make bundle
- name: run e2e test
run: make e2e-test
- name: upload Kind logs
uses: actions/upload-artifact@v3
if: always()
with:
name: kind-logs
path: kind-logs-*
- name: upload Trivy scan results to GitHub Security tab
if: always()
uses: github/codeql-action/upload-sarif@1fc1008278d05ba9455caf083444e6c5a1a3cfd8
with:
sarif_file: 'trivy-results.sarif'
- name: set owner of earthly cache
if: always()
run: sudo chown -R $(whoami) /var/lib/docker/volumes/earthly-cache
- name: save cache Earthly build
if: always()
uses: actions/cache/save@v3
with:
path: /var/lib/docker/volumes/earthly-cache/
key: earthly-cache
41 changes: 0 additions & 41 deletions .github/workflows/e2e-on-pr.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/go-lint-scan-pull_request.yaml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/gosec-scanner-on-pull_request.yaml

This file was deleted.

Loading