Skip to content

Instantly share code, notes, and snippets.

@wenqiglantz
Last active January 14, 2023 21:54
Show Gist options
  • Save wenqiglantz/b5c5f95fb187f54770439e83ddb8844e to your computer and use it in GitHub Desktop.
Save wenqiglantz/b5c5f95fb187f54770439e83ddb8844e to your computer and use it in GitHub Desktop.
# This CI workflow can be triggered by PR creation or code push in PR, or manual trigger (after maven release)
name: CI workflow for building, testing microservice, and publishing image to ECR
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to run the workflow against'
type: environment
required: true
pull_request:
branches: [ main ]
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
build-and-test:
permissions:
id-token: write # need this for OIDC
contents: read
uses: wenqiglantz/reusable-workflows-modules/.github/workflows/java-maven-build-test.yml@main
with:
env: ${{ github.event.inputs.environment }}
secrets: inherit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment