Hjordten / GithubActions

0 stars 0 forks source link

#First task #8

Closed Hjordten closed 1 year ago

Hjordten commented 1 year ago

Go through the manuel, and learn the syntax and keywords of YML.

Write down what you have learned in this issue, and make some templates you can use, when creating new YMl files.

Hjordten commented 1 year ago

name: learn-github-actions This is the default name that will show up in actions

run-name: ${{ github.actor }} is learning GitHub Actions this is a optional name, that will replace the original name, when viewing it in actions

on: [push]
condition of which the acction will run off. In this case this action will run, every time someone from the project, pushes anything to any branch or main.

jobs:
This is "job" that defines a set of acctions to be carried out. There can be several jobs, running different actions.

check-bats-version:
check clarefication on bottom

runs-on: ubuntu-latest
what the actions runs ons

steps:
Steps to be carried out. It can have as many steps as you want.

uses: actions/checkout@v3 Individual action to be carried out. Each uses can have a name that will be showed in action

with: Combines with the three other lines below.

node-version: '14' We tell what version we are using

Clarefication on jobs:

A job defines a set of actions to be carried out. There can only be one Job, but a job can have multiple sections withing it, but you need to name each section Example. jobs: my_first_job: name: My first job my_second_job: name: My second job

Clarefication on check-bats

check-bats is a command that is often used in GitHub Actions workflows to test shell scripts. Bats (Bash Automated Testing System) is a testing framework for Bash scripts, and check-bats is a tool that can be used to run Bats tests and report the results.