Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CodeQL"
name: CodeQL

on:
push:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/lock-sample.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "lock"
name: lock

on:
workflow_dispatch:
Expand All @@ -8,7 +8,6 @@ on:
required: false

permissions:
pull-requests: write
contents: write

jobs:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/unlock-sample.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: "unlock"
name: unlock

on:
workflow_dispatch:

permissions:
pull-requests: write
contents: write

jobs:
Expand Down
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ jobs:
runs-on: ubuntu-latest
steps:
# Lock or Unlock via a comment (ex: .lock or .unlock)
- uses: GrantBirki/lock@vX.X.X
- uses: github/lock@vX.X.X
id: lock
```

### Setting a Lock via a Workflow Dispatch Event

```yaml
name: "lock"
name: lock

on:
workflow_dispatch:
Expand All @@ -83,7 +83,6 @@ on:
required: false

permissions:
pull-requests: write
contents: write

jobs:
Expand All @@ -94,7 +93,7 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3.0.2

# Lock
- uses: GrantBirki/lock@vX.X.X
- uses: github/lock@vX.X.X
id: lock
with:
mode: "lock"
Expand All @@ -104,21 +103,20 @@ jobs:
### Removing a Lock via a Workflow Dispatch Event

```yaml
name: "unlock"
name: unlock

on:
workflow_dispatch:

permissions:
pull-requests: write
contents: write

jobs:
unlock:
runs-on: ubuntu-latest
steps:
# Unlock
- uses: GrantBirki/lock@vX.X.X
- uses: github/lock@vX.X.X
id: lock
with:
mode: "unlock"
Expand All @@ -127,12 +125,11 @@ jobs:
### Setting a Lock Conditionally (basic example)

```yaml
name: "lock (basic example)"
name: lock (basic example)

# on: (some event)

permissions:
pull-requests: write
contents: write

jobs:
Expand All @@ -143,7 +140,7 @@ jobs:
# if something occurs, set the lock below

# Unlock
- uses: GrantBirki/lock@vX.X.X
- uses: github/lock@vX.X.X
id: lock
with:
mode: "lock"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/GrantBirki/lock.git"
"url": "git+https://github.com/github/lock.git"
},
"keywords": [
"actions",
Expand Down