Skip to content

Commit

Permalink
remove deprecated features from GH workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
jenschude committed Nov 4, 2022
1 parent eb7538d commit 7a44027
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 88 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/ci.yml
Expand Up @@ -21,13 +21,6 @@ jobs:
distribution: 'temurin'
java-version: '8'

- name: Retrieve branch name
id: branch_name
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Fix code style
if: github.event_name == 'push' && github.ref != 'refs/heads/main'
run: ./gradlew spotlessApply
Expand Down Expand Up @@ -60,7 +53,7 @@ jobs:
CTP_CLIENT_ID: ${{ secrets.CTP_CLIENT_ID_PR }}
CTP_CLIENT_SECRET: ${{ secrets.CTP_CLIENT_SECRET_PR }}
CTP_PROJECT_KEY: ${{ secrets.CTP_PROJECT_KEY_PR }}
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
SOURCE_TAG: ${{ github.ref_name }}
CTP_JVM_SDK_LOG_LEVEL: OFF

- name: Run integration tests
Expand All @@ -70,7 +63,7 @@ jobs:
CTP_CLIENT_ID: ${{ secrets.CTP_CLIENT_ID }}
CTP_CLIENT_SECRET: ${{ secrets.CTP_CLIENT_SECRET }}
CTP_PROJECT_KEY: ${{ secrets.CTP_PROJECT_KEY }}
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
SOURCE_TAG: ${{ github.ref_name }}
CTP_JVM_SDK_LOG_LEVEL: OFF

- name: Test examples
Expand Down
107 changes: 55 additions & 52 deletions .github/workflows/codeql-analysis.yml
Expand Up @@ -3,69 +3,72 @@
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
schedule:
- cron: '0 14 * * 4'
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '43 15 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['java']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
steps:
- name: Checkout repository
uses: actions/checkout@v3

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

#- run: |
# make bootstrap
# make release
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
30 changes: 3 additions & 27 deletions .github/workflows/release.yml
Expand Up @@ -22,26 +22,18 @@ jobs:
distribution: 'temurin'
java-version: '8'

- name: Retrieve branch name
id: branch_name
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- run: scripts/setup-signing-key.sh
env:
DECRYPTER: ${{ secrets.DECRYPTER }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}

- run: ./gradlew -Pversion=$SOURCE_TAG clean test javadoc publishToSonatype closeAndReleaseSonatypeStagingRepository
- run: ./gradlew -Pversion=${{ github.ref_name }} clean test javadoc publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
CTP_OSS_USER: ${{ secrets.OSS_USER }}
CTP_OSS_SECRET: ${{ secrets.OSS_SECRET }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}

- run: rm -rf ~/.gradle/gradle.properties

Expand All @@ -57,16 +49,7 @@ jobs:
with:
ref: main

- name: Retrieve branch name
id: branch_name
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- run: ./gradlew -Pversion=$SOURCE_TAG writeVersionToReadme setVersion nextMinorVersion snapshotVersion
env:
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
- run: ./gradlew -Pversion=${{ github.ref_name }} writeVersionToReadme setVersion nextMinorVersion snapshotVersion

- name: "remove API reference commit SHA"
run: rm -rf reference.txt
Expand Down Expand Up @@ -108,14 +91,7 @@ jobs:
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1

- name: Retrieve branch name
id: branch_name
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- run: ./gradlew -Pversion=$SOURCE_TAG alljavadoc
- run: ./gradlew -Pversion=${{ github.ref_name }} alljavadoc
working-directory: sdk

- run: rm -rf doc/javadoc && mv sdk/build/docs/javadoc doc
Expand Down

0 comments on commit 7a44027

Please sign in to comment.