Skip to content

Updated pipeline

Updated pipeline #45

Workflow file for this run

name: Go
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.23']
permissions:
id-token: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
cache-dependency-path: subdir/go.sum
- name: Install dependencies
run: go mod tidy
- name: Run tests
run: go test ./...
- name: Debug GitHub directory
run: ls -R
# Setup AWS Credentials
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
# TODO - Finalize this 3.6. AWS console still not connecting!
# This won't build, but already confirmed prior, so no horsing!
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-session-name: GitHubActions
aws-region: us-east-1
- name: Verify AWS Credentials
run: aws sts get-caller-identity
# CDK Build
- name: Install AWS CDK
run: npm install -g aws-cdk
- name: CDK Synth
run: cdk synth --app "go run bin/cdk.go"
env:
ACCOUNT_ID: ${{ secrets.ACCOUNT_ID }}
# Trigger AWS CodeBuild for Lambda Build
- name: Trigger AWS CodeBuild
run: aws codebuild start-build --project-name "CodeBuildV1"
# Trigger AWS CodePipeline - Starts new deployment
- name: Trigger AWS CodePipeline
run: aws codepipeline start-pipeline-execution --name pipelineV1