Skip to content

fix: use context property #14

fix: use context property

fix: use context property #14

Workflow file for this run

name: Update version-set
on:
push:
tags:
- "v*.*.*"
jobs:
versionset:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- name: Checkout current code
uses: actions/checkout@v3
with:
path: 'source'
- name: Get values
id: vars
run: |
echo "version=$GITHUB_REF_NAME" | tee $GITHUB_OUTPUT
[ -f source/.versionset ] || { echo ".versionset file missing"; exit 1; }
echo "version_set_name=$(cat source/.versionset)" | tee $GITHUB_OUTPUT
env | sort
- name: Checkout version-set repo
uses: actions/checkout@v3
with:
path: 'versionset'
repository: geokrety/justatest2
- name: Update Version-Set
uses: fjogeleit/yaml-update-action@main
with:
valueFile: 'main.yml'
changes: |
{
"${{ steps.vars.outputs.version_set_name }}.docker_tag": "${{ github.ref_name }}",
"${{ steps.vars.outputs.version_set_name }}.git_url": "${{ github.server_url }}/${{ github.repository }}"
}
repository: geokrety/justatest2
targetBranch: main
token: ${{ secrets.GH_TOKEN }}
workDir: versionset
createPR: true
masterBranchName: main
branch: deployment/${{ github.repository }}/${{ github.ref_name }}
commitUserName: geokrety-bot
commitUserEmail: [email protected]
message: |
feat: Update ${{ github.repository }} version to ${{ github.ref_name }}