mirror of
https://github.com/cmur2/dyndnsd.git
synced 2024-12-22 00:54:22 +01:00
ci: use actionlint on GHA workflows
- https://github.com/rhysd/actionlint is cool
This commit is contained in:
parent
2838ad9eae
commit
dbc61d72fb
17
.github/actionlint-matcher.json
vendored
Normal file
17
.github/actionlint-matcher.json
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "actionlint",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"message": 4,
|
||||
"code": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
3
.github/workflows/cd.yml
vendored
3
.github/workflows/cd.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
|
||||
- name: Extract dyndnsd version from tag name
|
||||
run: |
|
||||
echo "DYNDNSD_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
|
||||
echo "DYNDNSD_VERSION=${GITHUB_REF#refs/*/v}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Wait for dyndnsd ${{ env.DYNDNSD_VERSION }} gem to be available
|
||||
run: |
|
||||
@ -23,6 +23,7 @@ jobs:
|
||||
for retry in $(seq 1 5); do
|
||||
echo "Checking if dyndnsd $DYNDNSD_VERSION gem is retrievable from rubygems.org (try #$retry)..."
|
||||
sudo gem install dyndnsd -v "$DYNDNSD_VERSION"
|
||||
# shellcheck disable=SC2181
|
||||
if [ $? -eq 0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@ -33,3 +33,13 @@ jobs:
|
||||
- name: Lint and Test
|
||||
run: |
|
||||
bundle exec rake ci
|
||||
|
||||
actionlint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Check workflow files
|
||||
run: |
|
||||
echo "::add-matcher::.github/actionlint-matcher.json"
|
||||
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
|
||||
./actionlint
|
||||
|
4
.github/workflows/vulnscan.yml
vendored
4
.github/workflows/vulnscan.yml
vendored
@ -16,9 +16,9 @@ jobs:
|
||||
steps:
|
||||
- name: Install Trivy
|
||||
run: |
|
||||
mkdir -p $GITHUB_WORKSPACE/bin
|
||||
mkdir -p "$GITHUB_WORKSPACE/bin"
|
||||
echo "$GITHUB_WORKSPACE/bin" >> "$GITHUB_PATH"
|
||||
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/master/contrib/install.sh | sh -s -- -b $GITHUB_WORKSPACE/bin
|
||||
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/master/contrib/install.sh | sh -s -- -b "$GITHUB_WORKSPACE/bin"
|
||||
- name: Download Trivy DB
|
||||
run: |
|
||||
trivy image --download-db-only
|
||||
|
Loading…
Reference in New Issue
Block a user