chore: Update to use Node20 version of Actions (#4787)
* chore: Update to use Node20 version of Actions * CR: Add additional triggers to milestone checker * CR: Remove use of third-party action
This commit is contained in:
1 parent
a2c529b9d1
commit
6eded679bc
6 files changed
+50
-66
No files matched your search
@@ -1,9 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"type": "check-milestone",
|
|
||||||
"title": "Milestone Check",
|
|
||||||
"success": "Milestone set",
|
|
||||||
"failure": "Milestone not set"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
@@ -13,6 +13,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
||||||
- name: Check workflow files
|
- name: Check workflow files
|
||||||
uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint@sha256:3f24bf9d72ca67af6f9f8f3cc63b0e24621b57bf421cecfc452c3312e32b68cc # 1.6.24
|
uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint@sha256:5acca218639222e4afbc82fc6e9ef56cbe646ade3b07f3f5ec364b638258a244
|
||||||
with:
|
with:
|
||||||
args: -color -ignore SC2129 -ignore "'property \"download-path\" is not defined in object type'"
|
args: -color -ignore SC2129 -ignore "'property \"download-path\" is not defined in object type'"
|
||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
||||||
- name: Set Product version
|
- name: Set Product version
|
||||||
id: set-product-version
|
id: set-product-version
|
||||||
uses: hashicorp/actions-set-product-version@v1 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
|
uses: hashicorp/actions-set-product-version@v2 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
|
||||||
|
|
||||||
product-metadata:
|
product-metadata:
|
||||||
needs: set-product-version
|
needs: set-product-version
|
||||||
@@ -175,7 +175,7 @@ jobs:
|
|||||||
CGO_ENABLED: "0"
|
CGO_ENABLED: "0"
|
||||||
PRERELEASE_PRODUCT_VERSION: ${{ needs.set-product-version.outputs.prerelease-product-version }}
|
PRERELEASE_PRODUCT_VERSION: ${{ needs.set-product-version.outputs.prerelease-product-version }}
|
||||||
METADATA_PRODUCT_VERSION: ${{ needs.product-metadata.outputs.product-edition }}
|
METADATA_PRODUCT_VERSION: ${{ needs.product-metadata.outputs.product-edition }}
|
||||||
uses: hashicorp/actions-go-build@v0.1.9 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
|
uses: hashicorp/actions-go-build@v1 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
|
||||||
with:
|
with:
|
||||||
product_name: ${{ env.PKG_NAME }}
|
product_name: ${{ env.PKG_NAME }}
|
||||||
product_version: ${{ needs.set-product-version. outputs.product-version }}
|
product_version: ${{ needs.set-product-version. outputs.product-version }}
|
||||||
@@ -185,10 +185,6 @@ jobs:
|
|||||||
reproducible: report
|
reproducible: report
|
||||||
instructions: |-
|
instructions: |-
|
||||||
make build
|
make build
|
||||||
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
|
||||||
with:
|
|
||||||
name: ${{ env.PKG_NAME }}_${{ needs.set-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
|
||||||
path: out/${{ env.PKG_NAME }}_${{ needs.set-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
needs:
|
needs:
|
||||||
@@ -247,7 +243,7 @@ jobs:
|
|||||||
CGO_ENABLED: "0"
|
CGO_ENABLED: "0"
|
||||||
PRERELEASE_PRODUCT_VERSION: ${{ needs.set-product-version.outputs.prerelease-product-version }}
|
PRERELEASE_PRODUCT_VERSION: ${{ needs.set-product-version.outputs.prerelease-product-version }}
|
||||||
METADATA_PRODUCT_VERSION: ${{ needs.product-metadata.outputs.product-edition }}
|
METADATA_PRODUCT_VERSION: ${{ needs.product-metadata.outputs.product-edition }}
|
||||||
uses: hashicorp/actions-go-build@v0.1.9 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
|
uses: hashicorp/actions-go-build@v1 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
|
||||||
with:
|
with:
|
||||||
product_name: ${{ env.PKG_NAME }}
|
product_name: ${{ env.PKG_NAME }}
|
||||||
product_version: ${{ needs.set-product-version. outputs.product-version }}
|
product_version: ${{ needs.set-product-version. outputs.product-version }}
|
||||||
@@ -257,10 +253,6 @@ jobs:
|
|||||||
reproducible: report
|
reproducible: report
|
||||||
instructions: |-
|
instructions: |-
|
||||||
make build
|
make build
|
||||||
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
|
||||||
with:
|
|
||||||
name: ${{ env.PKG_NAME }}_${{ needs.set-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
|
||||||
path: out/${{ env.PKG_NAME }}_${{ needs.set-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
|
||||||
- name: Copy license file to config_dir
|
- name: Copy license file to config_dir
|
||||||
env:
|
env:
|
||||||
LICENSE_DIR: ".release/linux/package/usr/share/doc/${{ env.PKG_NAME }}"
|
LICENSE_DIR: ".release/linux/package/usr/share/doc/${{ env.PKG_NAME }}"
|
||||||
@@ -351,7 +343,7 @@ jobs:
|
|||||||
CGO_ENABLED: "0"
|
CGO_ENABLED: "0"
|
||||||
PRERELEASE_PRODUCT_VERSION: ${{ needs.set-product-version.outputs.prerelease-product-version }}
|
PRERELEASE_PRODUCT_VERSION: ${{ needs.set-product-version.outputs.prerelease-product-version }}
|
||||||
METADATA_PRODUCT_VERSION: ${{ needs.product-metadata.outputs.product-edition }}
|
METADATA_PRODUCT_VERSION: ${{ needs.product-metadata.outputs.product-edition }}
|
||||||
uses: hashicorp/actions-go-build@v0.1.9 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
|
uses: hashicorp/actions-go-build@v1 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
|
||||||
with:
|
with:
|
||||||
product_name: ${{ env.PKG_NAME }}
|
product_name: ${{ env.PKG_NAME }}
|
||||||
product_version: ${{ needs.set-product-version. outputs.product-version }}
|
product_version: ${{ needs.set-product-version. outputs.product-version }}
|
||||||
@@ -361,10 +353,6 @@ jobs:
|
|||||||
reproducible: report
|
reproducible: report
|
||||||
instructions: |-
|
instructions: |-
|
||||||
make build
|
make build
|
||||||
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
|
||||||
with:
|
|
||||||
name: ${{ env.PKG_NAME }}_${{ needs.set-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
|
||||||
path: out/${{ env.PKG_NAME }}_${{ needs.set-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
|
|
||||||
|
|
||||||
build-docker:
|
build-docker:
|
||||||
name: Docker ${{ matrix.arch }} build
|
name: Docker ${{ matrix.arch }} build
|
||||||
@@ -385,7 +373,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
||||||
- name: Docker Build (Action)
|
- name: Docker Build (Action)
|
||||||
uses: hashicorp/actions-docker-build@v1 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
|
uses: hashicorp/actions-docker-build@v2 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
|
||||||
with:
|
with:
|
||||||
version: ${{ env.version }}
|
version: ${{ env.version }}
|
||||||
target: default
|
target: default
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ jobs:
|
|||||||
ssh -V
|
ssh -V
|
||||||
- name: Download Boundary Linux AMD64 bundle
|
- name: Download Boundary Linux AMD64 bundle
|
||||||
id: download
|
id: download
|
||||||
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact-name }}
|
name: ${{ inputs.artifact-name }}
|
||||||
path: ./enos/support/downloads
|
path: ./enos/support/downloads
|
||||||
@@ -209,7 +209,7 @@ jobs:
|
|||||||
mv ${{steps.download.outputs.download-path}}/*.zip enos/support/boundary.zip
|
mv ${{steps.download.outputs.download-path}}/*.zip enos/support/boundary.zip
|
||||||
- name: Download Boundary Linux AMD64 docker image
|
- name: Download Boundary Linux AMD64 docker image
|
||||||
if: contains(matrix.filter, 'e2e_docker')
|
if: contains(matrix.filter, 'e2e_docker')
|
||||||
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
|
||||||
id: download-docker
|
id: download-docker
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.docker-image-file }}
|
name: ${{ inputs.docker-image-file }}
|
||||||
|
|||||||
+38
-19
@@ -32,13 +32,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.JIRA_SYNC_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.JIRA_SYNC_GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Login
|
|
||||||
uses: atlassian/gajira-login@45fd029b9f1d6d8926c6f04175aa80c0e42c9026 # v3.0.1
|
|
||||||
env:
|
|
||||||
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
|
|
||||||
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
|
|
||||||
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
|
|
||||||
|
|
||||||
- name: Set ticket type
|
- name: Set ticket type
|
||||||
if: github.event.action == 'opened' && !steps.boundary-team-role.outputs.role
|
if: github.event.action == 'opened' && !steps.boundary-team-role.outputs.role
|
||||||
id: set-ticket-type
|
id: set-ticket-type
|
||||||
@@ -52,6 +45,10 @@ jobs:
|
|||||||
- name: Create ticket
|
- name: Create ticket
|
||||||
if: github.event.action == 'opened' && !steps.boundary-team-role.outputs.role
|
if: github.event.action == 'opened' && !steps.boundary-team-role.outputs.role
|
||||||
uses: tomhjp/gh-action-jira-create@3ed1789cad3521292e591a7cfa703215ec1348bf # v0.2.1
|
uses: tomhjp/gh-action-jira-create@3ed1789cad3521292e591a7cfa703215ec1348bf # v0.2.1
|
||||||
|
env:
|
||||||
|
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
|
||||||
|
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
|
||||||
|
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
|
||||||
with:
|
with:
|
||||||
project: ICU
|
project: ICU
|
||||||
issuetype: "GH Issue"
|
issuetype: "GH Issue"
|
||||||
@@ -64,6 +61,10 @@ jobs:
|
|||||||
if: github.event.action != 'opened'
|
if: github.event.action != 'opened'
|
||||||
id: search
|
id: search
|
||||||
uses: tomhjp/gh-action-jira-search@04700b457f317c3e341ce90da5a3ff4ce058f2fa # v0.2.2
|
uses: tomhjp/gh-action-jira-search@04700b457f317c3e341ce90da5a3ff4ce058f2fa # v0.2.2
|
||||||
|
env:
|
||||||
|
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
|
||||||
|
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
|
||||||
|
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
|
||||||
with:
|
with:
|
||||||
# cf[10089] is Issue Link custom field
|
# cf[10089] is Issue Link custom field
|
||||||
jql: 'issuetype = "GH Issue" and cf[10089]="${{ github.event.issue.html_url || github.event.pull_request.html_url }}"'
|
jql: 'issuetype = "GH Issue" and cf[10089]="${{ github.event.issue.html_url || github.event.pull_request.html_url }}"'
|
||||||
@@ -71,20 +72,38 @@ jobs:
|
|||||||
- name: Sync comment
|
- name: Sync comment
|
||||||
if: github.event.action == 'created' && steps.search.outputs.issue
|
if: github.event.action == 'created' && steps.search.outputs.issue
|
||||||
uses: tomhjp/gh-action-jira-comment@6eb6b9ead70221916b6badd118c24535ed220bd9 # v0.2.0
|
uses: tomhjp/gh-action-jira-comment@6eb6b9ead70221916b6badd118c24535ed220bd9 # v0.2.0
|
||||||
|
env:
|
||||||
|
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
|
||||||
|
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
|
||||||
|
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
|
||||||
with:
|
with:
|
||||||
issue: ${{ steps.search.outputs.issue }}
|
issue: ${{ steps.search.outputs.issue }}
|
||||||
comment: "${{ github.actor }} ${{ github.event.review.state || 'commented' }}:\n\n${{ github.event.comment.body || github.event.review.body }}\n\n${{ github.event.comment.html_url || github.event.review.html_url }}"
|
comment: "${{ github.actor }} ${{ github.event.review.state || 'commented' }}:\n\n${{ github.event.comment.body || github.event.review.body }}\n\n${{ github.event.comment.html_url || github.event.review.html_url }}"
|
||||||
|
|
||||||
- name: Close ticket
|
- name: Transitions
|
||||||
if: (github.event.action == 'closed' || github.event.action == 'deleted') && steps.search.outputs.issue
|
id: transitions
|
||||||
uses: atlassian/gajira-transition@38fc9cd61b03d6a53dd35fcccda172fe04b36de3 # v3.0.1
|
if: steps.search.outputs.issue
|
||||||
with:
|
run: |
|
||||||
issue: ${{ steps.search.outputs.issue }}
|
if [[ "${{ github.event.action }}" == "closed" || "${{ github.event.action }}" == "deleted" ]]; then
|
||||||
transition: Done
|
echo "Closing ticket"
|
||||||
|
echo "name=Done" >> "$GITHUB_OUTPUT"
|
||||||
|
elif [[ "${{ github.event.action }}" == "reopened" ]]; then
|
||||||
|
echo "Reopening ticket"
|
||||||
|
echo "name='Reopen'" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Reopen ticket
|
# Transition issue API reference: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-post
|
||||||
if: github.event.action == 'reopened' && steps.search.outputs.issue
|
- name: Transition ticket
|
||||||
uses: atlassian/gajira-transition@38fc9cd61b03d6a53dd35fcccda172fe04b36de3 # v3.0.1
|
if: steps.transitions.outputs.name
|
||||||
with:
|
run: |
|
||||||
issue: ${{ steps.search.outputs.issue }}
|
transitions="$(curl --silent \
|
||||||
transition: "To Do"
|
--url "${{ secrets.JIRA_BASE_URL }}rest/api/3/issue/${{ steps.search.outputs.issue }}/transitions" \
|
||||||
|
--user "${{ secrets.JIRA_USER_EMAIL }}:${{ secrets.JIRA_API_TOKEN }}" \
|
||||||
|
--header "Accept: application/json")"
|
||||||
|
id="$(echo "${transitions}" | jq -r '.transitions[] | select(.name == "${{ steps.transitions.outputs.name }}") | .id')"
|
||||||
|
curl --silent \
|
||||||
|
--url "${{ secrets.JIRA_BASE_URL }}rest/api/3/issue/${{ steps.search.outputs.issue }}/transitions" \
|
||||||
|
--user "${{ secrets.JIRA_USER_EMAIL }}:${{ secrets.JIRA_API_TOKEN }}" \
|
||||||
|
--header "Accept: application/json" \
|
||||||
|
--header "Content-Type: application/json" \
|
||||||
|
--data "$(printf '{"transition": {"id": "%s"}}' "${id}")"
|
||||||
@@ -5,7 +5,8 @@ name: Check Milestone
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, labeled, unlabeled]
|
# milestoned and demilestoned are supported even if IDE is complaining
|
||||||
|
types: [opened, synchronize, labeled, unlabeled, milestoned, demilestoned ]
|
||||||
# Runs on PRs to main and release branches
|
# Runs on PRs to main and release branches
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
@@ -22,20 +23,5 @@ jobs:
|
|||||||
if: contains(github.event.pull_request.labels.*.name, 'pr/no-milestone') != true
|
if: contains(github.event.pull_request.labels.*.name, 'pr/no-milestone') != true
|
||||||
runs-on: ${{ fromJSON(vars.RUNNER) }}
|
runs-on: ${{ fromJSON(vars.RUNNER) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Actions
|
- name: Check milestone
|
||||||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
run: ${{ github.event.pull_request.milestone != null }}
|
||||||
with:
|
|
||||||
repository: "grafana/grafana-github-actions"
|
|
||||||
path: ./actions
|
|
||||||
ref: be89ad434792280ebaa4d982ac72ba548b6f7095
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
|
||||||
with:
|
|
||||||
node-version: '16.x'
|
|
||||||
- name: Install Actions
|
|
||||||
run: npm install --production --prefix ./actions
|
|
||||||
- name: Run PR Checks
|
|
||||||
uses: ./actions/pr-checks
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
configPath: configs/milestone-check
|
|
||||||
Reference in new issue
Block a user