-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (54 loc) · 2.03 KB
/
checks.yaml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Checks
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
jobs:
ci:
runs-on: ubuntu-latest
outputs:
status: ${{ job.status }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name : Run EC Validate (keyless)
uses: ./
with:
image: ghcr.io/enterprise-contract/golden-container:latest@sha256:2042e3a419de34ce7e8c0b7d810259a36babdcb80aa55a72f8b0ec73030b2eb8 # latest
identity: https:\/\/github\.com\/(slsa-framework\/slsa-github-generator|enterprise-contract\/golden-container)\/
issuer: https://token.actions.githubusercontent.com
#FIXME Commented out because the golden-image on quay.io is failing due to a violation in the image.
# - name : Run EC Validate (Long_Lived)
# uses: ./
# with:
# image: quay.io/konflux-ci/ec-golden-image:latest
# key: ${{ vars.PUBLIC_KEY }}
# policy: github.com/enterprise-contract/config//slsa3
# extra-params: --ignore-rekor
release:
runs-on: ubuntu-latest
permissions:
contents: write
needs: ci
if: needs.ci.outputs.status == 'success' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
steps:
- name: Get Latest Version Tag and Increment
run: |
# Find the version tag and then increment new version with v prefix eg. v1.0.1 -> v1.0.2
latestVTag=$(gh api -H 'Accept: application/vnd.github.v3+json' /repos/${{ github.repository }}/releases/latest -q '.tag_name')
echo "newVersion=v$(echo ${latestVTag#v} | awk -F. '{$NF = $NF + 1;} 1' OFS=.)" >> $GITHUB_ENV
env:
GH_TOKEN: ${{ github.token }}
- name: Create New Version Release
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v2
with:
name: ${{ env.newVersion }} Release
body: ""
tag_name: ${{ env.newVersion }}
generate_release_notes: true
draft: false
prerelease: false