Skip to content
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

Upgrade dependencies, github actions #263

Merged
merged 1 commit into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
62 changes: 62 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Deploy

# Run this workflow every time a new commit pushed to your repository
on: push

jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
push-image:
# Name the Job
name: Push Image
# Set the type of machine to run on
runs-on: ubuntu-latest
steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v2
- name: Prepare
id: prep
run: |
echo ::set-output name=build_date::$(date -u +'%Y%m%d')
# https://github.com/docker/login-action#github-container-registry
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
# https://github.com/docker/login-action#github-packages-docker-registry
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and Push to ghcr.io
uses: docker/build-push-action@v2
with:
push: true
file: ./docker-image/debian/Dockerfile
tags: |
ghcr.io/${{ github.actor }}/webcron:canary
ghcr.io/${{ github.actor }}/webcron:3.0.0
ghcr.io/${{ github.actor }}/webcron:${{ github.sha }}
ghcr.io/${{ github.actor }}/webcron:${{ github.run_id }}
ghcr.io/${{ github.actor }}/webcron:${{ steps.prep.outputs.build_date }}
docker.io/${{ github.actor }}/webcron:canary
docker.io/${{ github.actor }}/webcron:3.0.0
docker.io/${{ github.actor }}/webcron:${{ github.sha }}
docker.io/${{ github.actor }}/webcron:${{ github.run_id }}
docker.io/${{ github.actor }}/webcron:${{ steps.prep.outputs.build_date }}
labels: |
org.opencontainers.image.title=webcron IDE
org.opencontainers.image.description=webcron Web IDE for Docker self-hosted development
org.opencontainers.image.vendor=${{ github.actor }}
org.opencontainers.image.authors=${{ github.actor }}
org.opencontainers.image.version=3.0.0
org.opencontainers.image.url=${{ github.event.repository.clone_url }}
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=${{ steps.prep.outputs.build_timestamp }}
org.opencontainers.image.revision=${{ github.sha }}
27 changes: 27 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: reviewdog
on: [pull_request]
jobs:
# https://github.com/marketplace/actions/run-hadolint-with-reviewdog
hadolint:
name: runner / hadolint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v1
- name: hadolint
uses: reviewdog/action-hadolint@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review # Default is github-pr-check

# https://github.com/marketplace/actions/run-codespell-with-reviewdog
codespell:
name: runner / codespell
runs-on: ubuntu-latest
steps:
- name: Check out code.
uses: actions/checkout@v1
- name: codespell
uses: plettich/action-codespell@master
with:
github_token: ${{ secrets.github_token }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARCHIVES_DIR = $(REPOSITORY_ROOT)/build/archives
NPM = $(TOOLCHAIN_DIR)/nodejs/bin/npm
REGISTRY = docker.io/jeremyje

NODEJS_VERSION = 12.16.3
NODEJS_VERSION = 14.17.3
export PATH := $(REPOSITORY_ROOT)/node_modules/.bin/:$(TOOLCHAIN_DIR)/nodejs/bin:$(PATH)


Expand Down
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: "Fast Changing News"
outputDirectory: "/tmp/output/news/"
format: ["txt"]
format: ["pdf"]
# https://crontab.guru/every-30-minutes
schedule: "*/5 * * * *"
browser:
Expand Down
18 changes: 14 additions & 4 deletions docker-image/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,21 @@ FROM alpine:latest
RUN apk update && apk upgrade \
&& echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \
&& echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \
&& apk add --no-cache chromium@edge nss@edge make curl
&& apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
nodejs \
yarn \
make \
curl

# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser

RUN addgroup webcron
RUN adduser -S -s /bin/bash -h /home/webcron webcron
Expand All @@ -33,9 +44,8 @@ EXPOSE 3000
ENTRYPOINT ["npm"]
CMD ["run", "serve"]


LABEL maintainer="Jeremy Edwards <[email protected]>" \
version="2.0.0" \
version="3.0.0" \
description="A server that will periodically download web content and store it in text, PDF, JPEG, and PNG format."

# Standardized Docker Image Labels
Expand Down
4 changes: 2 additions & 2 deletions docker-image/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN apt-get update \
libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 \
libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation \
libappindicator1 libnss3 lsb-release xdg-utils wget \
libappindicator1 libnss3 lsb-release xdg-utils wget libgbm-dev \
build-essential curl \
&& rm -rf /var/cache/apk/*
RUN useradd --create-home --home-dir /home/webcron --shell /bin/bash webcron
Expand All @@ -34,7 +34,7 @@ ENTRYPOINT ["npm", "run"]
CMD ["serve"]

LABEL maintainer="Jeremy Edwards <[email protected]>" \
version="2.0.0" \
version="3.0.0" \
description="A server that will periodically download web content and store it in text, PDF, JPEG, and PNG format."

# Standardized Docker Image Labels
Expand Down
Loading