Skip to content

Commit e60e1ae

Browse files
committed
Rename next-image-tag-number, update READMEs
1 parent dec28b9 commit e60e1ae

File tree

5 files changed

+45
-7
lines changed

5 files changed

+45
-7
lines changed

load-env/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# load-env Github Action
1+
# load-env GitHub Action
22

33
The **load-env** action provides .env key-value pairs as outputs for use in workflows.
44

next-image-tag-number/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# next-image-tag-number GitHub Action
2+
3+
The **next-image-tag-number** action calculates the next sequential tag for an image in an OCI repository. This is useful for tracking build numbers or versioning images in continuous integration workflows.
4+
5+
## Usage
6+
7+
Specify the OCI image repository URL in your workflow, along with optional parameters:
8+
9+
```yaml
10+
jobs:
11+
next-tag:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Get Next Image Tag Number
17+
id: next-tag
18+
uses: codebandits/github-actions/next-image-tag-number@main
19+
with:
20+
image_repository_url: https://registry.example.com/v2/my-repo/my-image
21+
bearer_token: ${{ secrets.REPO_BEARER_TOKEN }}
22+
initial_number: 100
23+
tag_prefix: build-
24+
25+
- run: echo "Next tag is ${{ steps.next-tag.outputs.tag }} with number ${{ steps.next-tag.outputs.number }}"
26+
```
27+
28+
## Inputs
29+
30+
- `image_repository_url:` **Required.** The URL of the OCI-compatible image repository.
31+
- `bearer_token:` Optional. The bearer token for repository authentication. Defaults to empty (no authentication).
32+
- `initial_number:` Optional. Starting tag number if no tags exist in the repository. Defaults to 1.
33+
- `tag_prefix:` Optional. Prefix for the tags. Defaults to build-.
34+
35+
## Outputs
36+
37+
- `tag:` The next tag, including the prefix and tag number.
38+
- `number:` The next tag number.

next-repository-tag-number/action.yml renamed to next-image-tag-number/action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Next Repository Tag Number
2-
description: Get the next tag number for a repository.
1+
name: Next Image Tag Number
2+
description: Get the next tag number for an image in an OCI repository.
33

44
inputs:
5-
repository_url:
6-
description: The URL of the OCI-compatible repository.
5+
image_repository_url:
6+
description: The URL of the OCI-compatible image repository.
77
required: true
88
bearer_token:
99
description: Optional bearer token for repository authentication.
@@ -19,7 +19,7 @@ inputs:
1919

2020
outputs:
2121
tag:
22-
description: The next tag.
22+
description: The next tag, including the prefix and tag number.
2323
value: ${{ steps.next-tag.outputs.tag }}
2424
number:
2525
description: The next tag number.
@@ -29,7 +29,7 @@ runs:
2929
using: docker
3030
image: Dockerfile
3131
args:
32-
- ${{ inputs.repository_url }}
32+
- ${{ inputs.image_repository_url }}
3333
- ${{ inputs.bearer_token }}
3434
- ${{ inputs.initial_number }}
3535
- ${{ inputs.tag_prefix }}

0 commit comments

Comments
 (0)