Skip to content

Commit

Permalink
feat: Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
kumy committed Mar 31, 2024
0 parents commit 4d13b88
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "composer" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "pip" # See documentation for possible values
directory: "/tests-qa/" # Location of package manifests
schedule:
interval: "weekly"
44 changes: 44 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: docker-build

on:
schedule:
- cron: "0 10 * * *"
push:
branches:
- "*"
tags:
- "*"
workflow_dispatch:

env:
IMAGE_NAME: geokrety/selenoid-image-firefox

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check for existing website-base image for current branch
if: "${{ !startsWith(github.ref, 'refs/tags/v') }}"
id: existing-image
run: |
if docker pull ${{ env.IMAGE_NAME }}:${{ github.ref_name }}; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Override base image tag from branch name
if: "${{ !startsWith(github.ref, 'refs/tags/v') && steps.existing-image.outputs.exists == 'true' }}"
run: |
sed -i "s/^ARG BASE_TAG=.*$/ARG BASE_TAG=${{ github.ref_name }}/" Dockerfile.*
- uses: geokrety/geokrety-gha-workflows/.github/actions/docker-build@main
with:
image_name: ${{ env.IMAGE_NAME }}
dockerhub_username: ${{ vars.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
dockerfile: Dockerfile.firefox
19 changes: 19 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: pre-commit

on:
pull_request:
branches-ignore:
- main
- master
- l10n_master
- l10n_new-theme
push:
branches-ignore:
- main
- master
- l10n_master
- l10n_new-theme

jobs:
lint:
uses: geokrety/geokrety-gha-workflows/.github/workflows/pre-commit.yml@main
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Automatic release

on:
# push:
# branches:
# - main
workflow_dispatch:

env:
IMAGE_NAME: geokrety/selenoid-image-firefox

jobs:
pre-commit:
uses: geokrety/geokrety-gha-workflows/.github/workflows/pre-commit.yml@main

docker:
uses: geokrety/geokrety-gha-workflows/.github/workflows/docker-build.yml@main
needs: pre-commit
with:
image_name: ${{ env.IMAGE_NAME }}
dockerhub_username: ${{ vars.DOCKERHUB_USERNAME }}
dockerfile: Dockerfile.firefox
secrets:
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}

build-release:
uses: geokrety/geokrety-gha-workflows/.github/workflows/semantic-release.yml@main
needs:
- docker
# # Uncomment to set mandatory
# - integration-tests
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: |
(?x)(
^vendor/
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-json
- id: pretty-format-json
args: ["--autofix"]

- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.9
hooks:
- id: remove-crlf
13 changes: 13 additions & 0 deletions Dockerfile.firefox
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ARG BASE_TAG=latest
FROM selenoid/firefox:$BASE_TAG

USER root

RUN apt-get update \
&& apt-get install -y \
fonts-urw-base35 \
ttf-bitstream-vera \
&& apt-get clean \
&& rm -r /var/lib/apt/lists/*

USER selenium

0 comments on commit 4d13b88

Please sign in to comment.