diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9363caf..141e084 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,15 @@ -name: kit +name: build on: - push: {} - release: - types: [published] - workflow_dispatch: {} + workflow_call: + inputs: + test-coverage-upload-role: + description: role to assume to upload test coverage results to S3. + type: string + required: false + test-coverage-upload-bucket: + description: S3 bucket to upload test coverage results to. + type: string + required: false permissions: packages: write contents: write @@ -24,3 +30,5 @@ jobs: sleep 1s done goTestExtraArgs: -p 1 --tags localstack + test-coverage-upload-role: ${{ inputs.test-coverage-upload-role }} + test-coverage-upload-bucket: ${{ inputs.test-coverage-upload-bucket }} diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml new file mode 100644 index 0000000..2b5dbd2 --- /dev/null +++ b/.github/workflows/dev.yml @@ -0,0 +1,20 @@ +name: kit-dev +on: + pull_request: + types: + - opened + - reopened + - synchronize + - ready_for_review + branches: + - main + workflow_dispatch: {} +jobs: + build: + uses: ./.github/workflows/build.yml + success: + runs-on: ubuntu-latest + if: success() + needs: [build] + steps: + - run: echo "workflow was successful" \ No newline at end of file diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml new file mode 100644 index 0000000..4e5e46b --- /dev/null +++ b/.github/workflows/prod.yml @@ -0,0 +1,12 @@ +name: kit-prod +on: + push: + branches: + - main + workflow_dispatch: {} +jobs: + build: + uses: ./.github/workflows/build.yml + with: + test-coverage-upload-role: arn:aws:iam::615890063537:role/tf-dev-github-actions-geonet-s3-coverage-kit + test-coverage-upload-bucket: dev-geonet-webscan \ No newline at end of file