diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..2834dee --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,44 @@ +name: Docker Image + +on: + push: + branches: + - '**' + tags: + - 'v*.*.*' + pull_request: + branches: + - 'master' + +jobs: + build-and-push-docker-image: + name: Build Docker image and push to repository + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: ghcr.io/${{ github.repository }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to Github Packages + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build image and push to GitHub Container Registry + uses: docker/build-push-action@v2 + with: + file: ./docker/Dockerfile + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + push: true diff --git a/docker/Dockerfile b/docker/Dockerfile index f21331f..cee5aed 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get update RUN apt-get install -y libgconf-2-4 wget xvfb unzip # Install Chrome (compatible version with chromedriver below) -ARG CHROME_VERSION="87.0.4280.141-1" +ARG CHROME_VERSION="99.0.4844.74-1" RUN wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb \ && apt install -y /tmp/chrome.deb \ && rm /tmp/chrome.deb @@ -14,7 +14,7 @@ RUN wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/ # RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb # RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install # Set up Chromedriver Environment variables -ENV CHROMEDRIVER_VERSION 87.0.4280.88 +ENV CHROMEDRIVER_VERSION 99.0.4844.51 ENV CHROMEDRIVER_DIR /chromedriver RUN mkdir $CHROMEDRIVER_DIR # Download and install Chromedriver