bryant-github-universe-2021 / GitHubUniverse2021-NA

GitHub Universe 2021 - NA
0 stars 0 forks source link

Hello, GitHub Actions continent! #1

Open bryantson opened 3 years ago

bryantson commented 3 years ago

Welcome to Hello, GitHub Actions continent

1_HelloGitHubActions

The god of this planet wants your journey to be useful and pleasant one. However, it is still nice to give a proper thanks to this planet...

Your mission

Learn about GitHub Actions

GitHub Actions overview

GitHub Actions is a GitHub product that allows you to automate your workflows.

image

GitHub Actions Marketplace

image

High level architecture of GitHub Actions

image

Basic syntax


# Defines the name
name: Super Linter Workflow

# Event that will get triggered. In this case, it gets triggered by push event
on:
  push:

# Different jobs can be defined
jobs:
  # Name of job
  lint:
     # Name of this job
     name: Lint Code Base

     # Type of runner. In this case, it is a default GitHub Actions runner
     runs-on: ubuntu-latest

     # You can define different steps
     steps:
        # First, checkout the code from the repo
        - uses: actions/checkout@v2
        # Uses the super-linter from GitHub Action plugin
        - uses: github/super-linter@v3
           env:
              # GitHub secret value can be used
              GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Let's create your first GitHub Actions

You need to create a GitHub Actions to say a proper greeting with a message:

Thank you for warm welcoming! My name is xxx I will enjoy my time in this wonderful GitHub Actions planet!

To do this you need to do the following steps:

  1. Copy the scripts below and save into your note
  2. Create a branch named hello-username where username is your GitHub username
  3. Go to .github and add a file name in following format action-hello-username.yml where you will replace username with your own GitHub username. Save the file by commiting to the directory.
  4. Make a Pull Request to the main branch
  5. Somebody will approve the workflow.
  6. You can then run your workflow
# Change this line with username with your GitHub username
name: Hello from @username

on:
  workflow_dispatch:
      inputs:
         myName:
            description: "Please type in your name"
            required: true
            default: ''

jobs:
   Hello-GitHub-Actions:
      runs-on: ubuntu-latest
      name: Just saying "hi"

      steps:
        - name: Hello, GitHub Actions planet
          run: |
             echo "Thank you for warm welcoming! My name is ${{ github.event.inputs.myName }}"
             echo "I will enjoy my time in this wonderful GitHub Actions planet!"
github-actions[bot] commented 3 years ago

Move to the next issue

github-actions[bot] commented 3 years ago

Move to the next issue Hello, GitHub Actions continent!

github-actions[bot] commented 3 years ago

Move to the next issue Hello, GitHub Actions continent! image

github-actions[bot] commented 3 years ago

Congratulation. You are done with Hello, GitHub Actions continent!

image Let's move to the next issue

github-actions[bot] commented 3 years ago

Congratulation. You are done with Hello, GitHub Actions continent!

image

Let's move to the next issue

github-actions[bot] commented 3 years ago

Congratulation. You are done with Hello, GitHub Actions continent!

image

Let's move to the next issue