workflow playground #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow used to experiment with GitHub Actions syntax. | |
name: "workflow playground" | |
on: | |
# Triggered manually. | |
workflow_dispatch: | |
inputs: | |
input1: | |
description: "input1: String input" | |
required: true | |
type: "string" | |
default: "Value" | |
input2: | |
description: "input2: Boolean input" | |
required: false | |
type: "boolean" | |
default: false | |
defaults: | |
run: | |
shell: "bash --noprofile --norc -o errexit -o errtrace -o pipefail -o nounset -o xtrace {0}" | |
jobs: | |
playground: | |
runs-on: ["self-hosted"] | |
steps: | |
- name: "Configure the environment" | |
run: | | |
TEMP_PATH="$RUNNER_TEMP/temp_file" | |
echo "TEMP_PATH=$TEMP_PATH" >>$GITHUB_ENV | |
echo "${{ secrets.TEST_FILE }}" >test_file | |
echo "${{ vars.TEST_VARIABLE_FILE }}" >"$TEMP_PATH" | |
- name: "Some test commands" | |
env: | |
TEST_VAR_1: "Hello World" | |
TEST_VAR_2: "$RUNNER_TEMP" | |
TEST_VAR_3: "${{ env.RUNNER_TEMP }}" | |
run: | | |
echo "=====" | |
echo "TEST_VAR_1: $TEST_VAR_1" | |
echo "TEST_VAR_2: $TEST_VAR_2" | |
echo "TEST_VAR_3: $TEST_VAR_3" | |
echo "TEMP_PATH: $TEMP_PATH" | |
echo "APTLY_GPG_SUBKEY: ${{ vars.APTLY_GPG_SUBKEY }}" | |
echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE" | |
echo "RUNNER_WORKSPACE: $RUNNER_WORKSPACE" | |
echo "=====" | |
echo "Current dir: $PWD" | |
ls -lAh | |
echo "=====" | |
ls -lA "$TEMP_PATH" | |
cat "$TEMP_PATH" | |
echo "=====" | |
ls -lA "$TEMP_PATH" | |
cat "$TEMP_PATH" | |
echo "=====" |