forked from aws/karpenter-provider-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (34 loc) · 1.14 KB
/
release-trigger.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
name: ReleaseTrigger
on:
push:
tags: ['v*.*.*']
branches: [ main ]
jobs:
release-trigger:
if: github.repository == 'aws/karpenter'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Save tag and SHA as an artifact for other workflows that run on workflow_run to download them
run: |
mkdir -p /tmp/artifacts
TAG=$(git describe --tags --exact-match || echo "no tag")
echo "${TAG}" > /tmp/artifacts/metadata.txt
git rev-parse HEAD >> /tmp/artifacts/metadata.txt
echo "metadata.txt contents:"
cat /tmp/artifacts/metadata.txt
echo "TAG=$TAG" >> $GITHUB_ENV
- uses: ./.github/actions/upload-artifact
- name: Create Github Release
if: env.TAG != 'no tag'
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
- uses: ./.github/actions/authenticate-ghcr
with:
actor: ${{ github.actor }}
secret: ${{ secrets.GITHUB_TOKEN }}
- run: make release-crd