-
Notifications
You must be signed in to change notification settings - Fork 42
build testing #1028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ranjinimn
wants to merge
9
commits into
suse-edge:main
Choose a base branch
from
ranjinimn:RMN-build-testing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
build testing #1028
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ecfead6
build testing
ranjinimn 8c36675
build testing 2
ranjinimn fb492a8
build testing - 27 Jan
ranjinimn 518c05a
added write permission
ranjinimn 4d4788f
added write permission and the main branch
ranjinimn 6670ee5
added pull request from test-deploy file
ranjinimn f3d2201
added the attribute-dir to publish to suse-edge.github.io
ranjinimn 34a3dd0
edited the attribute-dir to publish to suse-edge.github.io
ranjinimn e1903eb
spacing in line 111
ranjinimn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| name: Validate/build docs | ||
|
|
||
| # https://github.com/peaceiris/actions-gh-pages/issues/852 | ||
| permissions: | ||
| contents: write | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - "release-3.*" | ||
| # Review gh actions docs if you want to further define triggers, paths, etc | ||
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on | ||
| push: | ||
| branches: | ||
| - main | ||
| - "release-3.*" | ||
| # Review gh actions docs if you want to further define triggers, paths, etc | ||
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on | ||
| paths: | ||
| - 'DC-*' | ||
| - 'xml/**' | ||
| - 'adoc/**' | ||
| - 'images/src/**' | ||
| - '**/DC-*' | ||
| - '**/xml/**' | ||
| - '**/adoc/**' | ||
| - '**/images/src/**' | ||
|
|
||
| jobs: | ||
| select-dc-files: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| validate-list: ${{ steps.select-dc-validate.outputs.dc-list }} | ||
| build-list: ${{ steps.select-dc-build.outputs.dc-list }} | ||
| allow-build: ${{ steps.select-dc-build.outputs.allow-build }} | ||
| relevant-branches: ${{ steps.select-dc-build.outputs.relevant-branches }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Checking basic soundness of DC files | ||
| uses: openSUSE/doc-ci@gha-select-dcs | ||
| with: | ||
| mode: soundness | ||
|
|
||
| - name: Selecting DC files to validate | ||
| id: select-dc-validate | ||
| uses: openSUSE/doc-ci@gha-select-dcs | ||
| with: | ||
| mode: list-validate | ||
|
|
||
| - name: Selecting DC files to build | ||
| id: select-dc-build | ||
| uses: openSUSE/doc-ci@gha-select-dcs | ||
| with: | ||
| mode: list-build | ||
| original-org: SUSE | ||
|
|
||
| validate: | ||
| runs-on: ubuntu-latest | ||
| needs: select-dc-files | ||
| strategy: | ||
| # don't cancel all validation runners when one of them fails, we want full results | ||
| fail-fast: false | ||
| matrix: | ||
| dc-files: ${{ fromJson(needs.select-dc-files.outputs.validate-list) }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Validating DC file(s) ${{ matrix.dc-files }} | ||
| uses: openSUSE/doc-ci@gha-validate | ||
| with: | ||
| dc-files: ${{ matrix.dc-files }} | ||
|
|
||
|
|
||
| build-html: | ||
| runs-on: ubuntu-latest | ||
| needs: [select-dc-files, validate] | ||
| if: ${{ needs.select-dc-files.outputs.allow-build == 'true' }} | ||
| outputs: | ||
| artifact-name: ${{ steps.build-dc.outputs.artifact-name }} | ||
| artifact-dir: ${{ steps.build-dc.outputs.artifact-dir }} | ||
| strategy: | ||
| matrix: | ||
| dc-files: ${{ fromJson(needs.select-dc-files.outputs.build-list) }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Building DC file(s) ${{ matrix.dc-files }} | ||
| id: build-dc | ||
| uses: openSUSE/doc-ci@gha-build | ||
| with: | ||
| dc-files: ${{ matrix.dc-files }} | ||
| - name: Uploading builds as artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ steps.build-dc.outputs.artifact-name }} | ||
| path: ${{ steps.build-dc.outputs.artifact-dir }}/* | ||
| retention-days: 3 | ||
|
|
||
|
|
||
| publish: | ||
| runs-on: ubuntu-latest | ||
| if: ${{ success() }} | ||
| needs: [select-dc-files, build-html] | ||
| continue-on-error: true | ||
| steps: | ||
| - name: Downloading all build artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: artifact-dir | ||
| - name: Deploy to GitHub Pages | ||
| uses: peaceiris/actions-gh-pages@v3 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| # Build output to publish to the `gh-pages` branch: | ||
| publish_dir: artifact-dir | ||
| # The following lines assign commit authorship to the official | ||
| # GH-Actions bot for deploys to `gh-pages` branch: | ||
| # https://github.com/actions/checkout/issues/13#issuecomment-724415212 | ||
| # The GH actions bot is used by default if you didn't specify the two fields. | ||
| # You can swap them out with your own user credentials. | ||
| user_name: github-actions[bot] | ||
| user_email: 41898282+github-actions[bot]@users.noreply.github.com | ||
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously we had two distinct workflows:
If I'm reading this change correctly we now have both workflows combined, and running in both scenarios which I don't think is correct (we'll publish even for a PR before merging?)
I think we should likely keep the previous structure with two workflows, but adjust the workflow contents to align with this new file?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, correct. We had 2 defined workflows. Thank you for the suggestion :) I will separate the 2 actions and see if that helps in aligning the new workflow with the old one.