add docs workflow in manual release

This commit is contained in:
MuneebAijaz
2024-08-06 12:01:03 +05:00
parent 93f8467b33
commit 181b88a2b8
5 changed files with 35 additions and 63 deletions

View File

@@ -39,7 +39,6 @@ jobs:
ref: ${{github.event.pull_request.head.sha}}
fetch-depth: 0
# Setting up helm binary
- name: Set up Helm
uses: azure/setup-helm@v4
@@ -56,25 +55,6 @@ jobs:
check-latest: true
cache: true
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- '.markdownlint.yaml'
- '.vale.ini'
- 'Dockerfile-docs'
- 'docs-nginx.conf'
- 'docs/**'
- 'README.md'
- 'theme_common'
- 'theme_override'
# run only if 'workflows' files were changed
- name: workflow tests
if: steps.filter.outputs.docs == 'true'
run: echo "Workflow file"
# Get highest tag and remove any suffixes with '-'
- name: Get Highest tag
id: highest_tag

View File

@@ -1,7 +1,7 @@
name: Pull Request for Documentation Changes
on:
pull_request_target:
pull_request:
branches:
- master
paths:
@@ -20,12 +20,3 @@ jobs:
MD_CONFIG: .github/md_config.json
DOC_SRC: docs
MD_LINT_CONFIG: .markdownlint.yaml
build:
uses: stakater/.github/.github/workflows/pull_request_container_build.yaml@v0.0.82
with:
DOCKER_FILE_PATH: Dockerfile-docs
secrets:
CONTAINER_REGISTRY_URL: ghcr.io/stakater/docs
CONTAINER_REGISTRY_USERNAME: stakater-user
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.STAKATER_GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}

View File

@@ -187,10 +187,24 @@ jobs:
- 'theme_common'
- 'theme_override'
# run only if 'workflows' files were changed
- name: workflow tests
# run only if 'docs' files were changed
- name: Build and Push Docker Image for Docs to ghcr registry
if: steps.filter.outputs.docs == 'true'
run: echo "Workflow file"
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile-docs
pull: true
push: true
build-args: BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
cache-to: type=inline
platforms: linux/amd64,linux/arm,linux/arm64
tags: |
${{ env.GHCR_IMAGE_REPOSITORY }}/docs:merge-${{ github.event.number }}
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
##############################
## Add steps to generate required artifacts for a release here(helm chart, operator manifest etc.)

View File

@@ -1,30 +0,0 @@
# need changes in underlying workflow or to be merged with release workflow
# as to release docs images on PR
name: Push Documentation Changes
on:
push:
branches:
- master
paths:
- '.markdownlint.yaml'
- '.vale.ini'
- 'Dockerfile-docs'
- 'docs-nginx.conf'
- 'docs/**'
- 'README.md'
- 'theme_common'
- 'theme_override'
jobs:
push:
uses: stakater/.github/.github/workflows/push_container.yaml@v0.0.82
with:
DOCKER_FILE_PATH: Dockerfile-docs
RELEASE_BRANCH: master
secrets:
CONTAINER_REGISTRY_URL: ghcr.io/stakater/docs
CONTAINER_REGISTRY_USERNAME: stakater-user
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.STAKATER_GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}
GH_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}

View File

@@ -167,6 +167,23 @@ jobs:
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
- name: Build and Push Docker Image for Docs to ghcr registry
if: steps.filter.outputs.docs == 'true'
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile-docs
pull: true
push: true
build-args: BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
cache-to: type=inline
tags: |
${{ env.GHCR_IMAGE_REPOSITORY }}/docs:${{ steps.generate_tag.outputs.RELEASE_VERSION }}
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
##############################
## Add steps to generate required artifacts for a release here(helm chart, operator manifest etc.)
##############################