diff --git a/.github/workflows/03-core-features--06-passing-data.yaml b/.github/workflows/03-core-features--06-passing-data.yaml index a0f4907f..1a99338e 100644 --- a/.github/workflows/03-core-features--06-passing-data.yaml +++ b/.github/workflows/03-core-features--06-passing-data.yaml @@ -7,10 +7,10 @@ jobs: runs-on: ubuntu-24.04 outputs: - foo: ${{ steps.generate-foo.outputs.foo }} + foo: ${{ steps.gandon.outputs.foo }} steps: - name: Generate and export foo - id: generate-foo + id: gandon run: | foo=bar @@ -18,12 +18,12 @@ jobs: echo "foo=${foo}" >> "$GITHUB_OUTPUT" # 2) Job-scoped environment variable - echo "FOO=${foo}" >> "$GITHUB_ENV" + echo "zalupa=${foo}" >> "$GITHUB_ENV" - name: Inspect values inside producer run: | - echo "FOO (set via GITHUB_ENV): $FOO" - echo "foo (step output): ${{ steps.generate-foo.outputs.foo }}" + echo "zalupa (set via GITHUB_ENV): $zalupa" + echo "foo (step output): ${{ steps.gandon.outputs.foo }}" consumer: runs-on: ubuntu-24.04 diff --git a/.github/workflows/03-core-features--06-passing-dataPractise.yaml b/.github/workflows/03-core-features--06-passing-dataPractise.yaml new file mode 100644 index 00000000..9e4cd016 --- /dev/null +++ b/.github/workflows/03-core-features--06-passing-dataPractise.yaml @@ -0,0 +1,26 @@ +name: Pededaju dannie +on: + workflow_dispatch: + +jobs: + anton: + runs-on: ubuntu-24.04 + + outputs: + peremennaia: ${{ steps.mojId.outputs.peremennaia }} + + steps: + - name: Sozdanie i peredacha peremennoj + id: mojId + run: | + peremennaia=pizdaVolosataja + echo "peremennaia=$peremennaia" >> "$GITHUB_OUTPUT" + + gandon: + runs-on: ubuntu-24.04 + needs: anton + + steps: + - name: take value + run: | + echo "Value from anton: ${{ needs.anton.outputs.peremennaia }}" \ No newline at end of file