Use a valid compliance state in a test #6
Workflow file for this run
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: GoRelease | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
release: | |
name: release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup environment variables | |
run: | | |
TAG="${{ github.ref_name }}" | |
REPO_NAME="${GITHUB_REPOSITORY#*/}" | |
echo "TAG=${TAG}" >> ${GITHUB_ENV} | |
echo "REPO_NAME=${REPO_NAME}" >> ${GITHUB_ENV} | |
echo "IMAGE_PATH=quay.io/open-cluster-management/${REPO_NAME}:${TAG}" >> ${GITHUB_ENV} | |
- name: checkout code | |
uses: actions/checkout@v4 | |
- name: build images | |
run: | | |
make build-images | |
- name: push image | |
run: | | |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login quay.io --username ${{ secrets.DOCKER_USER }} --password-stdin | |
docker push ${{ env.IMAGE_PATH }} | |
- name: publish release | |
run: | | |
curl -fsSL -X POST -H "Accept: application/vnd.github+json" -o /dev/null \ | |
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
https://api.github.com/repos/${{ github.repository }}/releases \ | |
-d '{ | |
"tag_name": "${{ env.TAG }}", | |
"target_commitish": "main", | |
"name": "${{ env.TAG }}", | |
"body": "# ${{ env.REPO_NAME }} ${{ env.TAG }}\n- The released image is ${{ env.IMAGE_PATH }}", | |
"draft": true, | |
"prerelease": false, | |
"generate_release_notes": true | |
}' |