Skip to content

Commit

Permalink
[build] Fix duplicated Nightly releases creation
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
  • Loading branch information
VietND96 committed Jan 12, 2024
1 parent 408d430 commit 9f36b85
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/deploy.yml
Expand Up @@ -11,6 +11,7 @@ jobs:
if: contains(toJson(github.event.commits), '[deploy]') == true
name: Deploy Docker images
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -88,12 +89,13 @@ jobs:
run: ./generate_release_notes.sh ${LATEST_TAG} origin/trunk ${GRID_VERSION} ${BUILD_DATE}
- name: Create Release
id: create_release
uses: ncipollo/release-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@master
with:
tag: ${{ env.GRID_VERSION }}-${{ env.BUILD_DATE }}
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ env.GRID_VERSION }}-${{ env.BUILD_DATE }}
name: ${{ env.GRID_VERSION }}-${{ env.BUILD_DATE }}
bodyFile: "release_notes.md"
generateReleaseNotes: true
body_path: "release_notes.md"
generate_release_notes: true
prerelease: ${{ env.PRERELEASE }}
draft: false
append_body: false
30 changes: 15 additions & 15 deletions .github/workflows/nightly.yaml
Expand Up @@ -13,6 +13,7 @@ jobs:
deploy:
name: Nightly build
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -86,22 +87,21 @@ jobs:
echo "CHART_PACKAGE_PATH=$(cat /tmp/selenium_chart_version)" >> $GITHUB_ENV
echo "CHART_FILE_NAME=$(basename $(cat /tmp/selenium_chart_version))" >> $GITHUB_ENV
- name: Delete previous nightly tag if any
uses: dev-drprasad/delete-tag-and-release@master
uses: cb80/delrel@latest
with:
tag_name: ${{ env.BASE_RELEASE }}
github_token: ${{ secrets.GITHUB_TOKEN }}
delete_release: true
tag: ${{ env.BASE_RELEASE }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Nightly Release
id: create_release
uses: ncipollo/release-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@master
with:
artifacts: "${{ env.CHART_PACKAGE_PATH }}"
replacesArtifacts: true
bodyFile: "release_notes.md"
generateReleaseNotes: true
name: Nightly
tag: ${{ env.BASE_RELEASE }}
allowUpdates: true
prerelease: ${{ env.PRERELEASE }}
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ env.BASE_RELEASE }}
name: "Nightly"
body_path: "release_notes.md"
files: |
${{ env.CHART_PACKAGE_PATH }}
generate_release_notes: true
draft: false
prerelease: true
append_body: true
4 changes: 4 additions & 0 deletions charts/selenium-grid/README.md
Expand Up @@ -73,6 +73,10 @@ helm install selenium-grid --set ingress.hostname=selenium-grid.k8s.local docker
Nightly chart is built from the latest main branch of this repository with using Nightly images. It is not recommended to use this chart in production. It is only for testing purpose. The procedure to install the Nightly chart is the same as the above, only different on the version, it is `1.0.0-nightly`

```bash
# List all versions Nightly in the docker-selenium repo
helm search repo docker-selenium --devel

# Install basic grid Nightly version
helm install selenium-grid docker-selenium/selenium-grid --version 1.0.0-nightly
```

Expand Down

0 comments on commit 9f36b85

Please sign in to comment.