This repository has been archived by the owner on Jun 22, 2024. It is now read-only.
forked from SeleniumHQ/docker-selenium
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
130 changed files
with
3,935 additions
and
803 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -25,5 +25,8 @@ jobs: | |
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
with: | ||
mark_as_latest: false | ||
skip_existing: true | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
This file contains 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
This file contains 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
This file contains 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,108 @@ | ||
name: Nightly | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 1 * * *' | ||
|
||
jobs: | ||
deploy: | ||
name: Nightly build | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
- name: Output Docker info | ||
run: docker info | ||
- name: Sets build date | ||
run: echo "BUILD_DATE=$(date '+%Y%m%d')" >> $GITHUB_ENV | ||
- name: Sets prerelease to nightly | ||
run: | | ||
echo "PRERELEASE=true" >> $GITHUB_ENV | ||
echo "NAME=${NAMESPACE}" >> $GITHUB_ENV | ||
env: | ||
NAMESPACE: ${{ vars.DOCKER_NAMESPACE || 'selenium' }} | ||
- name: Build base image to get Grid version | ||
run: VERSION="local" BUILD_DATE=${BUILD_DATE} make base_nightly | ||
- name: Get Grid version | ||
# sed used to remove last comma of Selenium version output | ||
run: | | ||
echo "GRID_VERSION=$(docker run --rm ${{ env.NAME }}/base:local-${BUILD_DATE} java -jar /opt/selenium/selenium-server.jar hub --version | awk '{print $3}' | sed 's/\(.*\),/\1 /')" | awk '{$1=$1;print}' >> $GITHUB_ENV | ||
- name: Display Grid version and set Base version | ||
run: | | ||
echo ${GRID_VERSION} | ||
echo "BASE_VERSION=$(echo ${GRID_VERSION})" >> $GITHUB_ENV | ||
echo "BASE_RELEASE=nightly" >> $GITHUB_ENV | ||
- name: Update tag nightly | ||
uses: richardsimko/[email protected] | ||
with: | ||
tag_name: ${{ env.BASE_RELEASE }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Remove local Docker tag | ||
run: docker rmi ${{ env.NAME }}/base:local-${BUILD_DATE} | ||
- name: Build images | ||
run: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make build | ||
- name: Login Docker Hub | ||
run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" | ||
env: | ||
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} | ||
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | ||
- name: Tag images as nightly | ||
uses: nick-invision/retry@master | ||
with: | ||
timeout_minutes: 20 | ||
max_attempts: 3 | ||
command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make tag_nightly | ||
- name: Deploy nightly tag | ||
uses: nick-invision/retry@master | ||
with: | ||
timeout_minutes: 20 | ||
max_attempts: 3 | ||
command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make release_nightly | ||
- name: Get current latest tag | ||
run: echo "LATEST_TAG=$(git describe --tags --abbrev=0 --exclude=nightly --exclude=selenium-grid*)" >> $GITHUB_ENV | ||
- name: Display latest tag | ||
run: echo ${LATEST_TAG} | ||
- name: Sets env var for nightly tag | ||
run: | | ||
echo "NEXT_TAG=nightly" >> $GITHUB_ENV | ||
echo "FILTER_IMAGE_TAG=nightly" >> $GITHUB_ENV | ||
- name: Create release notes (release_notes.md) | ||
run: ./generate_release_notes.sh ${LATEST_TAG} origin/trunk ${GRID_VERSION} ${BUILD_DATE} | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: '3.11' | ||
check-latest: true | ||
- name: Update tag in docs and files | ||
run: ./update_tag_in_docs_and_files.sh ${LATEST_TAG} ${NEXT_TAG} | ||
- name: Setup environment to build chart | ||
run: make chart_setup_env | ||
- name: Build and lint charts | ||
run: | | ||
make chart_build_nightly | ||
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: cb80/delrel@main | ||
with: | ||
tag: ${{ env.BASE_RELEASE }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create Nightly Release | ||
id: create_release | ||
uses: softprops/action-gh-release@master | ||
with: | ||
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: false |
This file contains 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,53 @@ | ||
name: Scan Dockerfile vulnerabilities | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**/Dockerfile' | ||
pull_request: | ||
paths: | ||
- '**/Dockerfile' | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
build-and-scan: | ||
name: Scan Dockerfile vulnerabilities | ||
permissions: write-all | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set severity for PRs | ||
if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
run: | | ||
echo "SEVERITY=HIGH,CRITICAL" >> $GITHUB_ENV | ||
echo "EXIT_CODE=1" >> $GITHUB_ENV | ||
- name: Set severity for others | ||
if: github.event_name != 'pull_request' && github.event_name != 'push' | ||
run: | | ||
echo "SEVERITY=LOW,MEDIUM,HIGH,CRITICAL" >> $GITHUB_ENV | ||
echo "EXIT_CODE=0" >> $GITHUB_ENV | ||
- name: Scan source code | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
scan-type: 'fs' | ||
scan-ref: '.' | ||
format: 'sarif' | ||
output: 'source-results.sarif' | ||
scanners: 'vuln,secret,misconfig' | ||
skip-dirs: 'tests,Video' | ||
exit-code: '${{ env.EXIT_CODE }}' | ||
severity: '${{ env.SEVERITY }}' | ||
limit-severities-for-sarif: true | ||
- name: Upload source scan results to annotations | ||
if: always() | ||
uses: Ayrx/sarif_to_github_annotations@master | ||
with: | ||
sarif_file: 'source-results.sarif' | ||
- name: Upload source scan results to GitHub Security tab | ||
if: github.event_name != 'pull_request' | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: 'source-results.sarif' | ||
category: source-results |
Oops, something went wrong.