Skip to content
Open
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
78 changes: 78 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Java CI with Maven

on:
push:
branches: [ "labels" ]
pull_request:
branches: [ "labels" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6

- name: Setup Java JDK
uses: actions/setup-java@v3.14.1
with:
# The Java version to set up. Takes a whole or semver Java version. See examples of supported syntax in README file
java-version: # optional
# The path to the `.java-version` file. See examples of supported syntax in README file
java-version-file: # optional
# Java distribution. See the list of supported distributions in README file
distribution:
# The package type (jdk, jre, jdk+fx, jre+fx)
java-package: # optional, default is jdk
# The architecture of the package (defaults to the action runner's architecture)
architecture: # optional
# Path to where the compressed JDK is located
jdkFile: # optional
# Set this option if you want the action to check for the latest available version that satisfies the version spec
check-latest: # optional
# ID of the distributionManagement repository in the pom.xml file. Default is `github`
server-id: # optional, default is github
# Environment variable name for the username for authentication to the Apache Maven repository. Default is $GITHUB_ACTOR
server-username: # optional, default is GITHUB_ACTOR
# Environment variable name for password or token for authentication to the Apache Maven repository. Default is $GITHUB_TOKEN
server-password: # optional, default is GITHUB_TOKEN
# Path to where the settings.xml file will be written. Default is ~/.m2.
settings-path: # optional
# Overwrite the settings.xml file if it exists. Default is "true".
overwrite-settings: # optional, default is true
# GPG private key to import. Default is empty string.
gpg-private-key: # optional
# Environment variable name for the GPG private key passphrase. Default is $GPG_PASSPHRASE.
gpg-passphrase: # optional
# Name of the build platform to cache dependencies. It can be "maven", "gradle" or "sbt".
cache: # optional
# Workaround to pass job status to post job step. This variable is not intended for manual setting
job-status: # optional, default is ${{ job.status }}
# The token used to authenticate when fetching version manifests hosted on github.com, such as for the Microsoft Build of OpenJDK. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
token: # optional, default is ${{ github.server_url == 'https://github.com' && github.token || '' }}
# Name of Maven Toolchain ID if the default name of "${distribution}_${java-version}" is not wanted. See examples of supported syntax in Advanced Usage file
mvn-toolchain-id: # optional
# Name of Maven Toolchain Vendor if the default name of "${distribution}" is not wanted. See examples of supported syntax in Advanced Usage file
mvn-toolchain-vendor: # optional

50 changes: 50 additions & 0 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This workflow executes several linters on changed files based on languages used in your code base whenever
# you push a code or open a pull request.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/github/super-linter
name: Lint Code Base

on:
push:
branches: [ "labels" ]
pull_request:
branches: [ "labels" ]
jobs:
run-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0

- name: Lint Code Base
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: "main"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Terraform Apply for GorillaStack
runs-on: You may pin to the exact commit or the version.
uses: SWO-GS/github-action-apply-on-merge@71fab58db0a839b1e9b34e87601a5e4347c52c88
runs-on: ubuntu-latest
uses: SWO-GS/github-action-apply-on-merge@v0.1.0
with:
# The action type (currently "validate" and "apply" are available)
action: # default is validate
# The name of the tfstate bucket stack
stack_name: # default is github-actions-gorillastack-tfstate
# The region in which you deployed the tfstate bucket stack
aws_default_region: # default is us-east-1
# The AWS Access Key Id for the user with privileges to access the tfstate bucket
aws_access_key_id: # default is defaulted-for-everything-but-apply
# The AWS Secret Access Key for the user with privileges to access the tfstate bucket
aws_secret_access_key: # default is defaulted-for-everything-but-apply
# GorillaStack API Key, which is read-write or read-only, tied to your user identity
gorillastack_api_key: # default is defaulted-for-everything-but-apply
# GorillaStack Team Id, sets context of which team/tenant you are targeting
gorillastack_team_id: # default is defaulted-for-everything-but-apply

Comment on lines +30 to +50
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Invalid YAML – embedded GorillaStack snippet corrupts job definition
From line 30 onward the file drifts out of the env: block and introduces bare words (Terraform Apply for GorillaStack, runs-on:…) that violate YAML syntax, causing the workflow to be ignored.

If this Terraform step is needed, move it into a separate jobs: entry; otherwise, comment or delete it:

-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-            Terraform Apply for GorillaStack
-  runs-on:  You may pin to the exact commit or the version.
-   uses: SWO-GS/github-action-apply-on-merge@71fab58db0a839b1e9b34e87601a5e4347c52c88
-   runs-on: ubuntu-latest
-   uses: SWO-GS/github-action-apply-on-merge@v0.1.0
-   with:
-    # The action type (currently "validate" and "apply" are available)
-    action: # default is validate
-    ...
-    gorillastack_team_id: # default is defaulted-for-everything-but-apply
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+# --- Remove or properly scope the GorillaStack apply block below ---

Run actionlint locally to confirm the file parses after the fix.

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 actionlint (1.7.7)

32-32: could not parse as YAML: yaml: line 32: mapping values are not allowed in this context

(syntax-check)

🪛 YAMLlint (1.37.1)

[error] 50-50: trailing spaces

(trailing-spaces)


[error] 32-32: syntax error: mapping values are not allowed here

(syntax)

🤖 Prompt for AI Agents
In .github/workflows/super-linter.yml from lines 30 to 50, the embedded
GorillaStack snippet is incorrectly placed outside of any valid YAML block,
causing syntax errors. To fix this, remove or comment out the invalid lines or
move the entire Terraform Apply step into a properly defined separate job under
the jobs: section with correct indentation and keys like runs-on and uses. After
making these changes, run actionlint locally to verify the YAML parses
correctly.