Skip to content

Commit

Permalink
harbor_replication documentation bug (fixes #424) (#425)
Browse files Browse the repository at this point in the history
Signed-off-by: flbla <flbla@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
flbla and github-actions[bot] authored Apr 8, 2024
1 parent ac02d18 commit abaa831
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 10 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/tfplugindocs-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ on:
branches:
- main
- "release/**"
pull_request:
paths:
- .github/workflows/tfplugindocs-check.yml
- go.sum
- Makefile
- client/**
- main.go
- docs/**

jobs:
tfplugindocs_check:
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/tfplugindocs-generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# source https://github.com/hashicorp/terraform-provider-awscc/blob/main/.github/workflows/tfplugindocs-check.yml

name: Generate tfplugindocs /docs

on:
pull_request:
paths:
- .github/workflows/tfplugindocs-check.yml
- Makefile
- docs/**
- examples/**
- templates/**

jobs:
tfplugindocs_generate:
name: tfplugindocs generate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- uses: actions/setup-go@v5.0.0
with:
go-version-file: tools/go.mod
- name: GOCACHE
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
- uses: actions/cache@v4.0.0
continue-on-error: true
timeout-minutes: 2
with:
# TODO: Replace with supported mechanism when it is supported
# https://github.com/actions/setup-go/issues/54
path: ${{ env.GOCACHE }}
key: ${{ runner.os }}-GOCACHE-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }}
- uses: actions/cache@v4.0.0
continue-on-error: true
timeout-minutes: 2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- run: |
make tools
make docs
- uses: actions-js/push@v1.4
name: Github commit and push
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
message: "[bot][skip ci] docs: tfplugindocs generate"
2 changes: 1 addition & 1 deletion docs/resources/replication.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ resource "harbor_replication" "alpine" {
resource "harbor_replication" "alpine" {
name = "alpine"
action = "pull"
action = "push"
registry_id = harbor_registry.main.registry_id
schedule = "event_based"
filters {
Expand Down
2 changes: 1 addition & 1 deletion examples/resources/harbor_replication/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ resource "harbor_replication" "alpine" {

resource "harbor_replication" "alpine" {
name = "alpine"
action = "pull"
action = "push"
registry_id = harbor_registry.main.registry_id
schedule = "event_based"
filters {
Expand Down

0 comments on commit abaa831

Please sign in to comment.