Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies to address CVE-2024-7254 (0.2.x) #241

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 48 additions & 48 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ jobs:
publish_release: ${{ steps.check_release_tag.outputs.publish_release }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Check release tag
id: check_release_tag
run: |
git fetch --tags origin
TAGS=$(git tag --points-at HEAD | { grep -c "^v${BINDING_VERSION}$" || :; })
if [ "${GITHUB_EVENT_NAME}" != "pull_request" ] && [ $TAGS -eq 1 ]; then
echo "::set-output name=publish_release::true"
else
echo "::set-output name=publish_release::false"
fi
- name: Check release tag
id: check_release_tag
run: |
git fetch --tags origin
TAGS=$(git tag --points-at HEAD | { grep -c "^v${BINDING_VERSION}$" || :; })
if [ "${GITHUB_EVENT_NAME}" != "pull_request" ] && [ $TAGS -eq 1 ]; then
echo "::set-output name=publish_release::true"
else
echo "::set-output name=publish_release::false"
fi

check_version:
name: Check versions
Expand All @@ -41,52 +41,52 @@ jobs:
binding_version: ${{ env.BINDING_VERSION }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21

- name: Check package.json version
working-directory: bindings/node
run: |
NODE_MODULE_VERSION=$(jq --raw-output .version package.json)
echo "Expected version: ${BINDING_VERSION}"
echo "package.json version: ${NODE_MODULE_VERSION}"
[ "${NODE_MODULE_VERSION}" = "${BINDING_VERSION}" ] || exit 1
- name: Check package.json version
working-directory: bindings/node
run: |
NODE_MODULE_VERSION=$(jq --raw-output .version package.json)
echo "Expected version: ${BINDING_VERSION}"
echo "package.json version: ${NODE_MODULE_VERSION}"
[ "${NODE_MODULE_VERSION}" = "${BINDING_VERSION}" ] || exit 1

- name: Check pom.xml version
working-directory: bindings/java
run: |
POM_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Expected version: ${BINDING_VERSION}"
echo "pom.xml version: ${POM_VERSION}"
[ "${POM_VERSION%-SNAPSHOT}" = "${BINDING_VERSION}" ] || exit 1
- name: Check pom.xml version
working-directory: bindings/java
run: |
POM_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Expected version: ${BINDING_VERSION}"
echo "pom.xml version: ${POM_VERSION}"
[ "${POM_VERSION%-SNAPSHOT}" = "${BINDING_VERSION}" ] || exit 1

lint:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.20.2
cache: false
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
cache: false

- name: Cache build dependencies
uses: actions/cache@v4
env:
cache-name: makefile-deps
with:
path: ~/.cache/fabric-protos
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Makefile') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('Makefile') }}
${{ runner.os }}-${{ env.cache-name }}-
- name: Cache build dependencies
uses: actions/cache@v4
env:
cache-name: makefile-deps
with:
path: ~/.cache/fabric-protos
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Makefile') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('Makefile') }}
${{ runner.os }}-${{ env.cache-name }}-

- name: Run build
run: make lint
- name: Run build
run: make lint
88 changes: 44 additions & 44 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: GitHub Pages

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
workflow_dispatch:

jobs:
Expand All @@ -18,51 +18,51 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout (build)
uses: actions/checkout@v4
with:
path: build
- name: Checkout (build)
uses: actions/checkout@v4
with:
path: build

- name: Checkout (publish)
uses: actions/checkout@v4
with:
path: publish
- name: Checkout (publish)
uses: actions/checkout@v4
with:
path: publish

- name: Cache build dependencies
uses: actions/cache@v4
env:
cache-name: makefile-deps
with:
path: ~/.cache/fabric-protos
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Makefile') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('Makefile') }}
${{ runner.os }}-${{ env.cache-name }}-
- name: Cache build dependencies
uses: actions/cache@v4
env:
cache-name: makefile-deps
with:
path: ~/.cache/fabric-protos
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Makefile') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('Makefile') }}
${{ runner.os }}-${{ env.cache-name }}-

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.20.2
cache: false
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
cache: false

- name: Run make
run: make genprotos
working-directory: build
- name: Run make
run: make genprotos
working-directory: build

- name: Create GitHub pages commit
run: |
git config --global user.email "[email protected]"
git config --global user.name "hyperledger-bot"
git checkout --orphan publish-pages
git rm -rf .
cp -a ../build/docs/. .
git add -A
git commit -m "Deploy to GitHub Pages"
git status
git log --name-status
working-directory: publish
- name: Create GitHub pages commit
run: |
git config --global user.email "[email protected]"
git config --global user.name "hyperledger-bot"
git checkout --orphan publish-pages
git rm -rf .
cp -a ../build/docs/. .
git add -A
git commit -m "Deploy to GitHub Pages"
git status
git log --name-status
working-directory: publish

- name: Push GitHub pages commit
run: git push --force origin publish-pages:gh-pages
if: github.event_name != 'pull_request'
working-directory: publish
- name: Push GitHub pages commit
run: git push --force origin publish-pages:gh-pages
if: github.event_name != 'pull_request'
working-directory: publish
Loading
Loading