Skip to content

Instantly share code, notes, and snippets.

Avatar

Trần Văn Luận luandevpro

View GitHub Profile
View my-workflow.yml
name: "Docker Actions"
on: [push]
jobs:
action:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v1
View my-workflow.yml
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"
View main.go
package main
import (
"fmt"
"os"
)
func main() {
// Access Inputs as environment vars
View action.yml
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"
View my-workflow.yml
name: Docker Actions
on: [push]
jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
View Dockerfile
FROM golang:latest
WORKDIR /go/src/hello
COPY . .
RUN go get -d -v ./...
RUN go install -v ./...
CMD ["hello"]
View main.go
package main
import "fmt"
func main() {
fmt.Println("Hello Docker Actions")
}
View action.yml
name: "my hello action"
description: "say hello with GitHub Actions"
runs:
using: "docker"
image: "Dockerfile"
View actiond.md
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
View actions.yml
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
You can’t perform that action at this time.