Skip to content

Commit

Permalink
Merge pull request #19 from clouddrove/internal_502_3
Browse files Browse the repository at this point in the history
Internal 502 3
  • Loading branch information
Om Sharma authored Sep 25, 2023
2 parents 7d30f9c + bf51ed2 commit 1d01f8e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16.5-alpine
FROM golang:1.21-alpine

RUN ["/bin/sh", "-c", "apk add --update --no-cache bash ca-certificates rsync curl make git go jq openssh file"]

Expand Down
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ inputs:
tf_actions_working_dir:
description: 'Terraform working directory.'
default: '.'
modules:
description: 'Comma-separated list of modules to include'
required: false
outputs:
tf_actions_output:
description: 'The terraform outputs in JSON format.'
Expand All @@ -34,4 +37,5 @@ runs:
using: 'docker'
image: './Dockerfile'
args:
- ${{ inputs.github_token }} # args for the readme.sh
- ${{ inputs.github_token }}
- ${{ inputs.modules }}
6 changes: 5 additions & 1 deletion src/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function main {
source ${scriptDir}/terratest_go.sh
source ${scriptDir}/readme.sh
source ${scriptDir}/push.sh
source ${scriptDir}/do_login.sh
source ${scriptDir}/toc.sh

parseInputs
configureCLICredentials
Expand Down Expand Up @@ -145,6 +145,10 @@ function main {
installTerraform
goTest ${*}
;;
toc)
installTerraform
toc ${*}
;;
terratest_do)
installTerraform
goTest ${*}
Expand Down
24 changes: 24 additions & 0 deletions src/toc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

function toc {

git config --global user.name clouddrove-ci
git config --global user.email "anmol+ci@clouddrove.com"
# Add an exception for the /github/workspace/new-workflow directory
git config --global --add safe.directory /github/workspace/new-workflow
export GITHUB_ACCESS_TOKEN=$1
MODULES=$2
mkdir -p new-workflow
cd .. && rsync -av --progress workspace/. /github/workspace/new-workflow --exclude new-workflow && cd /github/workspace/new-workflow
cd .. && cd .. && cd ..
git clone https://$1@github.com/clouddrove/genie.git
cd genie
pwd && ls -la
cd /github/workspace/new-workflow
pwd && ls -la
make toc/deps
make toc include_modules="$MODULES"
git add .
git commit -m "feat: update toc readme file"

}

0 comments on commit 1d01f8e

Please sign in to comment.