Skip to content

Commit

Permalink
chore: Fix command
Browse files Browse the repository at this point in the history
  • Loading branch information
mdesouky committed Oct 23, 2024
1 parent aba3e46 commit f459e20
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@ jobs:
mise run install
mise run ci
set-common-values:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
KEY: ${{ steps.set_directory.outputs.key }}
steps:
- id: create_key
run: |
DECODED_KEY=$(echo "${{ secrets.CLUSTER_KEY }}" | base64 -d)
echo "key=$DECODED_KEY" >> "$GITHUB_OUTPUT"
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
BUILD_COMMAND: ${{ steps.set_command.outputs.command }}
steps:
- id: set_command
run: |
echo 'command<<EOF' >> "$GITHUB_OUTPUT"
echo 'echo "${{ secrets.CLUSTER_KEY }}" | base64 -d > cluster.key' >> "$GITHUB_OUTPUT"
echo 'EOF' >> "$GITHUB_OUTPUT"
build:
name: Build and Push Docker Image
needs: set-common-values
Expand All @@ -48,4 +49,4 @@ jobs:
docker-tag-latest: false
docker-image-platforms: linux/amd64
docker-repository: "305686791668.dkr.ecr.ap-southeast-2.amazonaws.com/gitops"
command: echo "${{needs.set-common-values.outputs.key}}" > cluster.key
command: ${{ needs.set-common-values.outputs.BUILD_COMMAND }}

0 comments on commit f459e20

Please sign in to comment.