Skip to content

tmp

tmp #2

Workflow file for this run

name: GoRelease
on:
push:
branches:
- fix-release-action
tags:
- 'v*.*.*'
workflow_dispatch: {}
env:
TAG: ${{ github.ref_name }}
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- 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 quay.io/open-cluster-management/config-policy-controller:${TAG}
- name: publish release
run: |
curl -L -X POST -H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/releases \
-d '{
"tag_name": "'${TAG}'",
"target_commitish": "main",
"name": "'${TAG}'",
"body": "# config-policy-controller '${TAG}'/n- The released image is quay.io/open-cluster-management/config-policy-controller:'${TAG}'",
"draft": true,
"prerelease": false,
"generate_release_notes": true
}'