Skip to content

Commit dbc2e36

Browse files
authored
Merge pull request #173 from roger-zhangg/refactor-action
Replace third-party GitHub Actions with gh CLI equivalents
2 parents a90cb39 + 377f311 commit dbc2e36

File tree

4 files changed

+50
-46
lines changed

4 files changed

+50
-46
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/check-binaries.yml

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ jobs:
1515
report_contents: ${{ steps.save-output.outputs.report_contents }}
1616
steps:
1717
- name: Setup python
18-
uses: actions/setup-python@v5
18+
uses: actions/setup-python@v6
1919
with:
2020
python-version: '3.11'
2121
- name: Checkout code
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323
with:
2424
ref: main
2525
- name: Download latest release
26-
uses: robinraju/release-downloader@v1.10
27-
with:
28-
latest: true
29-
fileName: 'aws-lambda-rie*'
30-
out-file-path: "bin"
26+
run: |
27+
mkdir -p bin
28+
gh release download --pattern 'aws-lambda-rie*' --dir bin
29+
env:
30+
GH_TOKEN: ${{ github.token }}
3131
- name: Run check for vulnerabilities
3232
id: check-binaries
3333
run: |
@@ -61,25 +61,29 @@ jobs:
6161
name: Save outputs for the check with the latest build
6262
id: save-new-version
6363
run: |
64-
if [ "${{ steps.check-new-version.outcome }}" == "failure" ]; then
64+
if [ "${CHECK_OUTCOME}" == "failure" ]; then
6565
fixed="No"
6666
else
6767
fixed="Yes"
6868
fi
6969
echo "fixed=$fixed" >> "$GITHUB_OUTPUT"
70+
env:
71+
CHECK_OUTCOME: ${{ steps.check-new-version.outcome }}
7072
- if: always() && steps.save-output.outputs.report_contents
7173
name: Create GitHub Issue indicating vulnerabilities
7274
id: create-issue
73-
uses: dacbd/create-issue-action@main
74-
with:
75-
token: ${{ github.token }}
76-
title: |
77-
CVEs found in latest RIE release
78-
body: |
79-
### CVEs found in latest RIE release
80-
```
81-
${{ steps.save-output.outputs.report_contents }}
82-
```
83-
84-
#### Are these resolved by building with the latest patch version of Go (${{ steps.check-new-version.outputs.latest_version }})?:
85-
> **${{ steps.save-new-version.outputs.fixed }}**
75+
run: |
76+
gh issue create \
77+
--title "CVEs found in latest RIE release" \
78+
--body "### CVEs found in latest RIE release
79+
\`\`\`
80+
${REPORT_CONTENTS}
81+
\`\`\`
82+
83+
#### Are these resolved by building with the latest patch version of Go (${LATEST_VERSION})?:
84+
> **${FIXED}**"
85+
env:
86+
GH_TOKEN: ${{ github.token }}
87+
REPORT_CONTENTS: ${{ steps.save-output.outputs.report_contents }}
88+
LATEST_VERSION: ${{ steps.check-new-version.outputs.latest_version }}
89+
FIXED: ${{ steps.save-new-version.outputs.fixed }}

.github/workflows/integ-tests.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,33 @@ permissions:
1212
jobs:
1313
go-tests:
1414
runs-on: ubuntu-latest
15-
environment:
16-
name: integ-tests
1715
steps:
18-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v6
1917
- name: run go tests
2018
run: make tests-with-docker
2119
integ-tests-x86:
2220
runs-on: ubuntu-latest
23-
environment:
24-
name: integ-tests
2521
steps:
26-
- uses: actions/checkout@v4
27-
- uses: actions/setup-python@v5
22+
- uses: actions/checkout@v6
23+
- uses: actions/setup-python@v6
2824
with:
2925
python-version: '3.11'
3026
- name: run integration tests
3127
run: make integ-tests-with-docker-x86-64
3228
integ-tests-arm64:
3329
runs-on: ubuntu-latest
34-
environment:
35-
name: integ-tests
3630
steps:
37-
- uses: actions/checkout@v4
38-
- uses: actions/setup-python@v5
31+
- uses: actions/checkout@v6
32+
- uses: actions/setup-python@v6
3933
with:
4034
python-version: '3.11'
4135
- name: run integration tests
4236
run: make integ-tests-with-docker-arm64
4337
integ-tests-old:
4438
runs-on: ubuntu-latest
45-
environment:
46-
name: integ-tests
4739
steps:
48-
- uses: actions/checkout@v4
49-
- uses: actions/setup-python@v5
40+
- uses: actions/checkout@v6
41+
- uses: actions/setup-python@v6
5042
with:
5143
python-version: '3.11'
5244
- name: run integration tests

.github/workflows/release.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
environment: Release
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v6
2323
with:
2424
ref: main
2525
- name: Set up python
26-
uses: actions/setup-python@v5
26+
uses: actions/setup-python@v6
2727
with:
2828
python-version: '3.11'
2929
- name: Build
@@ -33,12 +33,14 @@ jobs:
3333
make tests-with-docker
3434
make integ-tests
3535
- name: Release
36-
uses: softprops/action-gh-release@v2
37-
with:
38-
name: Release ${{ github.event.inputs.releaseVersion }}
39-
tag_name: v${{ github.event.inputs.releaseVersion }}
40-
body: ${{ github.event.inputs.releaseBody }}
41-
files: |
42-
bin/aws-lambda-rie
43-
bin/aws-lambda-rie-arm64
36+
run: |
37+
gh release create "v${RELEASE_VERSION}" \
38+
--title "Release ${RELEASE_VERSION}" \
39+
--notes "${RELEASE_BODY}" \
40+
bin/aws-lambda-rie \
41+
bin/aws-lambda-rie-arm64 \
4442
bin/aws-lambda-rie-x86_64
43+
env:
44+
GH_TOKEN: ${{ github.token }}
45+
RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }}
46+
RELEASE_BODY: ${{ github.event.inputs.releaseBody }}

0 commit comments

Comments
 (0)