Skip to content

Commit

Permalink
Restructure Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ciroque committed Dec 27, 2023
1 parent 7cc898e commit 1468fb0
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
29 changes: 23 additions & 6 deletions .github/workflows/build-and-sign-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@
name: Build and sign image

on:
pull_request:
types:
- closed
push:
branches:
- "main"

- "iss-20-add-sbom"
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build_and_sign_image:
if: ${{ github.event.pull_request.merged }}
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -27,6 +25,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: anchore/sbom-action@v0
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
registry-username: ${{ github.actor }}
registry-password: ${{ secrets.GITHUB_TOKEN }}

- name: Install cosign
uses: sigstore/cosign-installer@9614fae9e5c5eddabb09f90a270fcb487c9f7149 #v3.0.2
with:
Expand Down Expand Up @@ -79,3 +83,16 @@ jobs:
sarif_file: 'trivy-results-${{ inputs.image }}.sarif'
sha: ${{ github.sha }}
ref: ${{ github.ref }}

- name: Generate Release
uses: ncipollo/release-action@v1
with:
body: |
# Release ${{ github.ref }}
## Changelog
${{ steps.meta.outputs.changelog }}
commit: ${{ github.ref }}
discussionCategory: "Release"
generateReleaseNotes: true
makeLatest: false
name: "nginx-loadbalancer-kubernetes ${{ github.ref }}"
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: CI
name: Run tests

on:
branch_protection_rule:
types:
- created

push:
branches: [ "main", "*" ]
branches:
- main
- *

jobs:

Expand Down

0 comments on commit 1468fb0

Please sign in to comment.