Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adfsaa #7

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions .github/workflows/first-github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,29 @@ name: learn-github-actions
on:
push:
branches:
- main
- master

jobs:
check-bats-version:
create-file:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install bats
run: npm install -g bats
- name: Check bats version
run: bats -v
- name: Use Secret
- name: Checkout code
uses: actions/checkout@v2

- name: Create and Write to File
env:
FIRST_KEY: ${{ secrets.FIRST_KEY }}
ENV_VALUE: ${{ secrets.ENV_VALUE }}
run: |
echo "Writing value to file..."
echo "Key: $ENV_VALUE" > my-file.txt

- name: Display File Contents
id: display-contents
run: |
echo "Contents of my-file.txt:"
cat my-file.txt

- name: Use File Contents
run: |
echo "The secret key value is $FIRST_KEY"
echo "File Contents: ${{ steps.display-contents.outputs.file-contents }}"