From ec2980c1876a11b1f94367f6286af2666e4744be Mon Sep 17 00:00:00 2001 From: John-Michael Faircloth Date: Mon, 12 Jun 2023 14:58:04 -0500 Subject: [PATCH] chore: update jira teams and add actionlint (#465) * chore: update jira teams and add actionlint * update local test to workflow_dispatch * define outputs * try actionlint's skip_outputs setting * move skip_outputs to action definition in tests * move skip_outpus to action.yml * remove skip_outputs * move outputs * call actionlint directly to pass args * try to fix quoting * truncate ignore * try escaping * add comment --- .github/workflows/actionlint.yaml | 19 +++++++++++++++++++ .github/workflows/jira.yaml | 2 +- .github/workflows/local-test.yaml | 14 +++++++++----- README.md | 19 +++++++++++++------ 4 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/actionlint.yaml diff --git a/.github/workflows/actionlint.yaml b/.github/workflows/actionlint.yaml new file mode 100644 index 0000000..ee79a64 --- /dev/null +++ b/.github/workflows/actionlint.yaml @@ -0,0 +1,19 @@ +name: Lint GitHub Actions Workflows +on: + push: + paths: + - '.github/workflows/**' + +jobs: + actionlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - name: "Lint workflow files" + uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint:latest + with: + # Ignore actionlint errors from strict typing for outputs that we use + # in our e2e tests. + # This error occurs because vault-action's outputs are dynamic but + # actionlint expects action.yml to define them. + args: '-ignore "property \"othersecret\" is not defined in object type"' diff --git a/.github/workflows/jira.yaml b/.github/workflows/jira.yaml index 253531b..ad067a0 100644 --- a/.github/workflows/jira.yaml +++ b/.github/workflows/jira.yaml @@ -14,4 +14,4 @@ jobs: JIRA_SYNC_USER_EMAIL: ${{ secrets.JIRA_SYNC_USER_EMAIL }} JIRA_SYNC_API_TOKEN: ${{ secrets.JIRA_SYNC_API_TOKEN }} with: - teams-array: '["applications-eco"]' + teams-array: '["ecosystem", "applications-eco"]' diff --git a/.github/workflows/local-test.yaml b/.github/workflows/local-test.yaml index 2603491..fb3bce3 100644 --- a/.github/workflows/local-test.yaml +++ b/.github/workflows/local-test.yaml @@ -1,16 +1,20 @@ # This is a sample workflow to help test contributions # Change the branch name, url and token to fit with your own environment -# Use 'on: push' instead of 'on: local-test' if you wish to run the test on github -# If running locally with act, run the workflow with 'act local-test' +# To run this locally with act use: +# act workflow_dispatch -j local-test +# +# If you have permissions, you can run this workflow via the GitHub UI. +# Otherwise, use 'on: push' instead of 'on: workflow_dispatch'. -# Don't forget to revert the file changes and invalidate any tokens that were committed before opening a pull-request -on: local-test +# Don't forget to revert the file changes and invalidate any tokens that were +# committed before opening a pull request. +on: workflow_dispatch name: local-test jobs: - build: + local-test: name: local-test runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index 875cfff..5613c61 100644 --- a/README.md +++ b/README.md @@ -546,8 +546,12 @@ $ npm run test:integration:basic # Choose one of: basic, enterprise, e2e, e2e-tl ### Running the action locally -You can use the [act](https://github.com/nektos/act) command to test your changes locally if desired. Unfortunately it is not currently possible to use uncommitted local changes for a shared workfow. You will still need to push -the changes you would like to validate beforehand. Even if a commit is necessary, this is still a more detailed and faster feedback loop than waiting for the action to be executed by Github in a different repository. +You can use the [act](https://github.com/nektos/act) command to test your +changes locally if desired. Unfortunately it is not currently possible to use +uncommitted local changes for a shared workfow. You will still need to push the +changes you would like to validate beforehand. Even if a commit is necessary, +this is still a more detailed and faster feedback loop than waiting for the +action to be executed by Github in a different repository. Push your changes into a feature branch. ```sh @@ -556,8 +560,11 @@ $ git commit -m "testing new changes" $ git push ``` -Edit the ./.github/workflows/local-test.yaml file to use your new feature branch. You may have to additionally edit the vault url, token and secret path if you are not using one of the provided containerized instance. -Run your feature branch locally. +Edit the ./.github/workflows/local-test.yaml file to use your new feature +branch. You may have to additionally edit the vault url, token and secret path +if you are not using one of the provided containerized instance. Run your +feature branch locally. + ```sh -$ act local-test -``` \ No newline at end of file +$ act workflow_dispatch -j local-test +```