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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Docker Actions" | |
on: [push] | |
jobs: | |
action: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
) | |
func main() { | |
// Access Inputs as environment vars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Actions | |
on: [push] | |
jobs: | |
action: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:latest | |
WORKDIR /go/src/hello | |
COPY . . | |
RUN go get -d -v ./... | |
RUN go install -v ./... | |
CMD ["hello"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
fmt.Println("Hello Docker Actions") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "my hello action" | |
description: "say hello with GitHub Actions" | |
runs: | |
using: "docker" | |
image: "Dockerfile" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 |
NewerOlder