Skip to content

Commit

Permalink
feat: parse flake.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
Skylar Simoncelli committed Sep 18, 2024
1 parent bc0d2fb commit faee0b5
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 460 deletions.
250 changes: 0 additions & 250 deletions .github/workflows/artifact.yml

This file was deleted.

26 changes: 19 additions & 7 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,26 @@ jobs:
tag: ${{ inputs.tag }}

partner-chains-smart-contracts:
uses: ./.github/workflows/modules/download-pcsc-artifact.yml
with:
release:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.sha }}

#uses: ./.github/workflows/modules/build-pcsc-artifact.yml
#with:
# sha: #TODO
- name: Extract PCSC Release Info from flake.nix
id: extract-release
run: |
echo "Extracting PCSC release version from flake.nix..."
release=$(cat flake.nix | grep -Po 'url = "github:input-output-hk/partner-chains-smart-contracts/v\K[0-9.]+(?=";)')
echo "Release version: $release"
echo "::set-output name=release::$release"
- name: Call Download Artifact Workflow
uses: ./.github/workflows/modules/download-pcsc-artifact.yml
with:
release: ${{ steps.extract-release.outputs.release }}
artifact: "Specify-your-artifact-name-here"

local-environment-tests:
needs: [build-pc-artifacts, partner-chains-smart-contracts]
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/modules/build-pc-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,11 @@ on:
required: true
workflow_dispatch:
inputs:
partner_chains_sha:
sha:
description: "partner-chains commit SHA or branch to build from"
partner-chains-tag:
tag:
description: "partner-chains release tag to append to artifact name"
required: true
create_draft_release_page:
description: "Create a draft release page"
required: false
default: "false"

jobs:
partner-chains-linux:
Expand All @@ -28,13 +24,13 @@ jobs:
- name: Set filename variables
id: set-filenames
run: |
echo "PARTNER_CHAINS_CLI_X86_64_LINUX=partner-chains-cli-${{ github.event.inputs.partner-chains-tag }}-x86_64-linux" >> $GITHUB_ENV
echo "PARTNER_CHAINS_NODE_X86_64_LINUX=partner-chains-node-${{ github.event.inputs.partner-chains-tag }}-x86_64-linux" >> $GITHUB_ENV
echo "PARTNER_CHAINS_CLI_X86_64_LINUX=partner-chains-cli-${{ inputs.tag }}-x86_64-linux" >> $GITHUB_ENV
echo "PARTNER_CHAINS_NODE_X86_64_LINUX=partner-chains-node-${{ inputs.tag }}-x86_64-linux" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.partner_chains_sha }}
ref: ${{ inputs.sha }}

- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
Expand Down
Loading

0 comments on commit faee0b5

Please sign in to comment.