Skip to content

use upstream coreDNS chart instead of fork (#1776) #40

use upstream coreDNS chart instead of fork (#1776)

use upstream coreDNS chart instead of fork (#1776) #40

Workflow file for this run

name: Release tagging
on:
push:
branches:
- 'master'
paths:
- 'chart/k8gb/Chart.yaml'
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
cut_release:
runs-on: ubuntu-20.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Get Desired Tag
run: |
tag=$(awk '/appVersion:/ {print $2}' chart/k8gb/Chart.yaml)
echo "Version to release: ${tag}"
echo "desired_tag=${tag}" >> $GITHUB_ENV
- name: Push Tag
if: startsWith(github.event.head_commit.message, 'RELEASE:')
uses: mathieudutour/github-tag-action@fcfbdceb3093f6d85a3b194740f8c6cec632f4e2 #v6.1
with:
github_token: ${{ secrets.CR_TOKEN }}
create_annotated_tag: true
tag_prefix: ""
custom_tag: ${{ env.desired_tag }}
- name: Get Current Tag
if: startsWith(github.event.head_commit.message, 'Revert "RELEASE:')
run: |
tag=$(git describe --tags --abbrev=0)
echo "Version to revert: ${tag}"
echo "current_tag=${tag}" >> $GITHUB_ENV
- name: Get Previous Tag
if: startsWith(github.event.head_commit.message, 'Revert "RELEASE:')
run: |
tag=$(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)
echo "Previous tag: ${tag}"
echo "previous_tag=${tag}" >> $GITHUB_ENV
- name: Delete Tag and Release
if: startsWith(github.event.head_commit.message, 'Revert "RELEASE:') && env.desired_tag == env.previous_tag
uses: dev-drprasad/delete-tag-and-release@7550ea180f81ca0a875ee3c135b1f72ef66ff4b1
with:
delete_release: true # default: false
tag_name: ${{ env.current_tag }}
env:
GITHUB_TOKEN: ${{ secrets.CR_TOKEN }}