Sig
Sig

Reputation: 5986

How do I define a GitHub action?

I'm trying to play around with GitHub actions but I'm having a hard time just have it to start.

As a first step, I have copied the following workflow on a brand new repo. https://help.github.com/en/articles/creating-a-docker-container-action#example-using-a-private-action

But I get a parsing error

https://github.com/inforlife/action-test/blob/master/.github/main.workflow https://raw.githubusercontent.com/inforlife/action-test/master/.github/main.workflow?token=AA3RFK7OVCNLSMBMVHK6GB25SKZRQ

Am I missing anything here?

Upvotes: 3

Views: 673

Answers (2)

VonC
VonC

Reputation: 1328282

You mentioned .github/main.workflow

The documentation suggests:

.github/workflows/main.yml

Adding that main.yml with .github/workflows/ should work better.

Upvotes: 3

peterevans
peterevans

Reputation: 42210

The .github/main.workflow HCL format is GitHub Actions version 1. This version no longer works. GitHub Actions version 2 uses yaml format workflows under .github/workflows/.

Try starting with these starter workflows https://github.com/actions/starter-workflows

Upvotes: 4

Related Questions