Skip to content

[WIP] Make create release action appear on github #5

[WIP] Make create release action appear on github

[WIP] Make create release action appear on github #5

Workflow file for this run

name: Create Release
permissions:
contents: write
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release in the format v0.0.0-tetrate-v0'
required: true
branch:
description: 'Branch to release from. Like release-v0.0.0'
required: true
## TODO delete this
pull_request: {}
jobs:
update-kubegres-yaml:
runs-on: ubuntu-latest
env:
IMG: tetrate/kubegres:${{ github.event.inputs.version }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
# - name: Generate a token
# id: app_token
# uses: actions/create-github-app-token@v1
# with:
# app-id: ${{ secrets.RELEASE_ACTION_APP_ID }}
# private-key: ${{ secrets.RELEASE_ACTION_PRIVATE_KEY }}
# - name: Get GitHub App User ID
# id: get-user-id
# run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
# env:
# GH_TOKEN: ${{ steps.app-token.outputs.token }}
# - name: Configure git with App User
# run: |
# git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
# git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
- name: Update kubegres.yaml
run: make deploy
- name: Commit and push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: "pre-release-tag: Update kubegres.yaml to version ${{ github.event.inputs.version }}"
branch: ${{ github.event.inputs.branch }}
- name: Create the release tag
uses: ncipollo/release-action@v1
with:
tag: ${{ github.event.inputs.version }}
# - name: Create and push the new tag
# run: |
# git add kubegres.yaml config/manager/kustomization.yaml
# git commit -m "pre-release-tag: Update kubegres.yaml to version ${{ github.event.inputs.version }}"
# git push origin ${{ github.event.inputs.branch }}
# git tag ${{ github.event.inputs.version }}
# git push origin ${{ github.event.inputs.version }}