Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

staging

staging #79

Workflow file for this run

name: staging
on:
workflow_call:
inputs:
tag:
description: 'Tag of new release to push'
required: true
type: string
workflow_dispatch:
inputs:
tag:
description: 'Tag of new release to push'
required: true
type: string
permissions:
contents: write # for creating a release
jobs:
args:
runs-on: ubuntu-latest
outputs:
commit: ${{ steps.getflags.outputs.commit }}
steps:
- id: checkout
uses: actions/checkout@v3
- id: getflags
run: |
echo "commit=$(echo -n $GITHUB_SHA | head -c 8)" >> "$GITHUB_OUTPUT"
deploy:
runs-on: ubuntu-22.04
needs: args
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install yq
run: |
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O yq
chmod +x yq
- name: Update tags
run: |
./yq e -i ".release= \"${{ inputs.tag }}\"" chart/staging.yaml
- name: Commit and tag
run: |
git config --global user.email "[email protected]"
git config --global user.name "Trustification CI"
git commit chart/staging.yaml -m 'Update staging version'
git tag v0.1.0-staging.${{ needs.args.outputs.commit }} -m 'Tag staging'
git push --follow-tags