From da1410b207ce0ed5fa35e5638a8eeddf79c9d18a Mon Sep 17 00:00:00 2001 From: jcollier Date: Fri, 13 Oct 2023 14:19:48 +0100 Subject: [PATCH] test changes --- .github/action.yaml | 61 ----------------------------------- .github/workflows/action.yaml | 36 +++++++++++++++++++++ 2 files changed, 36 insertions(+), 61 deletions(-) delete mode 100644 .github/action.yaml create mode 100644 .github/workflows/action.yaml diff --git a/.github/action.yaml b/.github/action.yaml deleted file mode 100644 index 36be5abf9f..0000000000 --- a/.github/action.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# This defines the name of the workflow as it will appear in the "Actions" tab of the GitHub repository. -name: 'Generate Read More related' - -on: - workflow_dispatch: - push: - branches: - - automate-read-more - # Add the `pull_request` event, so that the workflow runs automatically every time a pull request is created or updated. For more information, see [`pull_request`](/actions/using-workflows/events-that-trigger-workflows#pull_request). - pull_request: - -# This modifies the default permissions granted to `GITHUB_TOKEN`. This will vary depending on the needs of your workflow. For more information, see "[AUTOTITLE](/actions/using-jobs/assigning-permissions-to-jobs)." -# -# In this example, the `pull-requests: read` permission is needed for the `trilom/file-changes-action` action that is used later in this workflow. -permissions: - contents: read - pull-requests: read -# The `concurrency` key ensures that only a single workflow in the same concurrency group will run at the same time. For more information, see "[AUTOTITLE](/actions/using-jobs/using-concurrency)." -# `concurrency.group` generates a concurrency group name from the workflow name and pull request information. The `||` operator is used to define fallback values. -# `concurrency.cancel-in-progress` cancels any currently running job or workflow in the same concurrency group. -concurrency: - group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' - cancel-in-progress: true - -# The `jobs` key groups together all the jobs that run in the workflow file. -jobs: - # This line defines a job with the ID `check-links` that is stored within the `jobs` key. - generate-read-more: - # The `runs-on` key in this example configures the job to run on a GitHub-hosted runner or a self-hosted runner, depending on the repository running the workflow. - # - # In this example, the job will run on a self-hosted runner if the repository is named `docs-internal` and is within the `github` organization. If the repository doesn't match this path, then it will run on an `ubuntu-latest` runner hosted by GitHub. For more information on these options, see "[AUTOTITLE](/actions/using-jobs/choosing-the-runner-for-a-job)." - runs-on: ["ubuntu-latest", "github-hosted"] - # The `steps` key groups together all the steps that will run as part of the `check-links` job. Each job in a workflow has its own `steps` section. - steps: - # The `uses` key tells the job to retrieve the action named `actions/checkout`. This is an action that checks out your repository and downloads it to the runner, allowing you to run actions against your code (such as testing tools). You must use the checkout action any time your workflow will use the repository's code or you are using an action defined in the repository. - - name: Checkout - uses: actions/checkout@v4 - fetch-depth: 0 - - # This step uses the `actions/setup-node` action to install the specified version of the Node.js software package on the runner, which gives you access to the `npm` command. - - name: Setup node - uses: actions/setup-node@v3 - with: - node-version: 16.13.x - cache: npm - - # The `run` key tells the job to execute a command on the runner. In this example, `npm ci` is used to install the npm software packages for the project. - - name: Install - run: npm install - - # This step uses the `trilom/file-changes-action` action to gather all the changed files. This example is pinned to a specific version of the action, using the `a6ca26c14274c33b15e6499323aac178af06ad4b` SHA. - # - # In this example, this step creates the file "${{ env.HOME }}/files.json", among others. - - name: Gather files changed - uses: trilom/file-changes-action@a6ca26c14274c33b15e6499323aac178af06ad4b - with: - fileOutput: 'json' - - # To help with verification, this step lists the contents of `files.json`. This will be visible in the workflow run's log, and can be useful for debugging. - - name: Show files changed - run: cat $HOME/files.json \ No newline at end of file diff --git a/.github/workflows/action.yaml b/.github/workflows/action.yaml new file mode 100644 index 0000000000..b9ac660838 --- /dev/null +++ b/.github/workflows/action.yaml @@ -0,0 +1,36 @@ +name: Generate Read More related + +on: + push: + branches: + - automate-read-more + pull_request: + +permissions: + contents: read + pull-requests: read + +concurrency: + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + cancel-in-progress: true + +jobs: + generate-read-more: + runs-on: "ubuntu-latest" + steps: + - name: Checkout + uses: actions/checkout@v4 + fetch-depth: 0 + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 16.13.x + cache: npm + - name: Install + run: npm install + - name: Gather files changed + uses: trilom/file-changes-action@a6ca26c14274c33b15e6499323aac178af06ad4b + with: + fileOutput: 'json' + - name: Show files changed + run: cat $HOME/files.json \ No newline at end of file