update the tektonpruner condition status to avoid warns on log #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build and publish | |
on: | |
push: | |
branches: | |
- main | |
tags: ["v*"] | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout the source code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: ^1.22 | |
- name: cache go modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: ko-build/[email protected] | |
- name: build and push container images | |
run: ./hack/build.sh | |
env: | |
KO_PUSH: "true" | |
KO_DOCKER_REPO: "ghcr.io/${{ github.repository }}" | |
- name: generate a build timestamp and sha256sum files | |
run: | | |
cd builds | |
echo `date -u +'%Y%m%d%H%M%S'` > ./build_timestamp.txt | |
echo `date -u +'%Y-%m-%dT%H:%M:%S%:z'` >> ./build_timestamp.txt | |
sha256sum *.yaml > ./SHA256SUMS.txt | |
- name: update release notes and executables | |
if: startsWith(github.ref, 'refs/tags/') # executes only for new release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
builds/*.yaml | |
builds/build_timestamp.txt | |
builds/SHA256SUMS.txt | |
- name: Update executables for main branch changes | |
if: startsWith(github.ref, 'refs/heads/main') # executes only for changes in main | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: main-devel | |
prerelease: true | |
title: "Development Build - main branch" | |
files: | | |
builds/*.yaml | |
builds/build_timestamp.txt | |
builds/SHA256SUMS.txt |