Skip to content

Instantly share code, notes, and snippets.

View luandevpro's full-sized avatar

Luận Trần luandevpro

View GitHub Profile
name: "Docker Actions"
on: [push]
jobs:
action:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v1
name: "my hello action"
description: "say hello with GitHub Actions"
inputs:
firstGreeting:
description: "who would you like to greet in the console"
required: true
default: "Hubot"
package main
import (
"fmt"
"os"
)
func main() {
// Access Inputs as environment vars
name: "my hello action"
description: "say hello with GitHub Actions"
inputs:
firstGreeting:
description: "who would you like to greet in the console"
required: true
default: "Hubot"
name: Docker Actions
on: [push]
jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
FROM golang:latest
WORKDIR /go/src/hello
COPY . .
RUN go get -d -v ./...
RUN go install -v ./...
CMD ["hello"]
package main
import "fmt"
func main() {
fmt.Println("Hello Docker Actions")
}
name: "my hello action"
description: "say hello with GitHub Actions"
runs:
using: "docker"
image: "Dockerfile"
Parameter Description Required
Name The name of your action. Helps visually identify the actions in a job.
Description A summary of what your action does.
Inputs Input parameters allow you to specify data that the action expects to use during runtime. These parameters become environment variables in the runner.
Outputs Specifies the data that subsequent actions can use later in
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1