Skip to content

update-contents

update-contents #2

name: Update content
on:
repository_dispatch:
types: [update-contents]
jobs:
update-content:
name: Update Content
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set Git Config and checkout main branch
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
git config --global user.name "vdaas-ci"
git config --global user.email "[email protected]"
git remote set-url origin "https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git submodule update --init --recursive
git checkout main
git fetch --prune
git pull origin main
env:
GITHUB_USER: ${{ secrets.DISPATCH_USER }}
GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
- name: Fetch Go version
id: go_version
shell: bash
run: |
GO_VERSION=${GO_VERSION:-`make version/go`}
echo "version=${GO_VERSION}" >> $GITHUB_OUTPUT
env:
GO_VERSION: ${{ input.go_version }}

Check failure on line 34 in .github/workflows/auto-update-content.yml

View workflow run for this annotation

GitHub Actions / Update content

Invalid workflow file

The workflow is not valid. .github/workflows/auto-update-content.yml (Line: 34, Col: 23): Unrecognized named-value: 'input'. Located at position 1 within expression: input.go_version
- uses: actions/setup-go@v4
with:
go-version: ${{ steps.go_version.outputs.version }}
- name: Check Go version
shell: bash
run:
go version
- name: Setup Hugo
if: steps.check_release.outputs.release == 'true'
uses: peaceiris/actions-hugo@v2
with:
hugo-version: latest
- name: Update root content
run: |
make init
make all
- name: Update latest version content
run: |
make TARGET_VER=$(make version/latest) all
- name: Update support version content
run: |
make TARGET_VER=$(make version/support) all
- name: create pull request
uses: pater-evans/create-pull-requests@v5
with:
token: ${GITHUB_TOKEN}
commit-message: ":pencil: update contents"
commiter: ${GITHUB_USER}
author: ${GITHUB_USER}
signoff: true
branch: release/dispatch-update-contents
branch-suffix: timestamp
base: main
title: "release update contents"
body: ":pencil: release update contents"
env:
GITHUB_USER: ${{ secrets.DISPATCH_USER }}
GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}