Skip to content

Commit

Permalink
mount file path /mnt/workspace/ and added ${{ env.LIQUIBASE_VERSION }}
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayali M authored and Sayali M committed Feb 9, 2024
1 parent cdfab65 commit 97dbcb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,15 @@ jobs:
- name: Mount commands.json
run: |
spacectl stack environment mount --id liquibase-github-actions commands.json commands.json
echo "commands_file_path=${commands_file_path}" >> $GITHUB_ENV
- name: Deploy infrastructure
# if: github.ref == 'refs/heads/main'
env:
SPACELIFT_API_KEY_ENDPOINT: ${{ secrets.SPACELIFT_API_KEY_ENDPOINT }}
SPACELIFT_API_KEY_ID: ${{ secrets.SPACELIFT_API_KEY_ID }}
SPACELIFT_API_KEY_SECRET: ${{ secrets.SPACELIFT_API_KEY_SECRET }}
COMMANDS_FILE_PATH: ${{ env.commands_file_path }}
run: |
spacectl stack set-current-commit --id liquibase-github-actions --sha ${{ github.sha }}
spacectl stack deploy --id liquibase-github-actions --auto-confirm
Expand Down
8 changes: 1 addition & 7 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@ provider "github" {
owner = "liquibase-github-actions"
}

data "null_data_source" "commands" {
inputs = {
file_contents = file("/mnt/workspace/commands.json")
}
}

locals {
commands = jsondecode(data.null_data_source.commands.outputs.file_contents)
commands = jsondecode(file("${path.module}/commands.json"))
}

resource "github_repository" "liquibase-github-actions" {
Expand Down

0 comments on commit 97dbcb4

Please sign in to comment.