Skip to content

Commit

Permalink
update GHA for main branch
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Labarussias <[email protected]>
  • Loading branch information
Issif committed Oct 12, 2023
1 parent 9f9a75c commit 8b7c27d
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 38 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ jobs:
with:
install-only: true

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Run Mage
uses: magefile/mage-action@v2
with:
Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,28 @@ jobs:
uses: goreleaser/goreleaser-action@v4
with:
install-only: true

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}


- name: Run Mage
uses: magefile/mage-action@v2
with:
version: latest
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}


- name: Push images to Dockerhub
run: |
docker manifest push --purge issif/falco-talon:latest
2 changes: 1 addition & 1 deletion deployment/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ replicaCount: 2
image:
registry: docker.io
repository: issif/falco-talon
tag: v0.1.0-rc2
tag: latest
pullPolicy: Always

podSecurityPolicy:
Expand Down
4 changes: 3 additions & 1 deletion mageFile.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ func BuildImages() error {
}

func Build() error {
mg.Deps(Test)

exportLDFlags()
return sh.RunV("goreleaser", "release", "--clean", "--snapshot", "--skip-sbom", "--skip-publish")
return sh.RunV("goreleaser", "release", "--clean", "--snapshot", "--skip-sign", "--skip-sbom", "--skip-publish")
}

func Release() error {
Expand Down
40 changes: 11 additions & 29 deletions rules.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,11 @@
- name: Rule Script
match:
rules:
- Test Script
action:
name: kubernetes:script
parameters:
script: |-
date
curl https://httpbin.org/ip
- name: Rule Label
match:
rules:
- Test Label
action:
name: kubernetes:labelize
parameters:
labels:
suspicious: "true"
- name: Rule Terminate
match:
rules:
- Test Terminate
action:
name: kubernetes:terminate
parameters:
minHealthyReplicas: "1"
ignoreDaemonsets: true
ignoreStatefulsets: true
- name: Rule Test NetworkPolicy
match:
rules:
- DANGER UNWANTED outbound connection destination
priority: "Critical"
action:
name: kubernetes:networkpolicy
parameters:
continue: true
notifiers:
- slack

0 comments on commit 8b7c27d

Please sign in to comment.