Skip to content

add write permission to action #3

add write permission to action

add write permission to action #3

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Update Timestamp
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ github.token }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
actions: write
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M:%S.%f%z')"
- name: Update json-values description
uses: restack/[email protected]
with:
file: OnlineSettings.json
values: "{'OnlineSettingsTime': '${{ steps.date.outputs.date }}'}"