build: Add GitHub Actions workflow for automatic nightly datatracker DB image build
Commit ready for merge. - Legacy-Id: 19750
This commit is contained in:
parent
fd5d933625
commit
dddaebd0f3
|
@ -5,6 +5,7 @@
|
|||
root = true
|
||||
|
||||
# Settings for IETF datatracker
|
||||
# ---------------------------------------------------------
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
|
@ -14,3 +15,25 @@ charset = utf-8
|
|||
# to avoid tripping Henrik's commit hook:
|
||||
trim_trailing_whitespace = false
|
||||
insert_final_newline = false
|
||||
|
||||
# Settings for .github folder
|
||||
# ---------------------------------------------------------
|
||||
|
||||
[.github/**]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = false
|
||||
insert_final_newline = true
|
||||
|
||||
# Settings for client-side JS / Vue files
|
||||
# ---------------------------------------------------------
|
||||
|
||||
[client/**]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
43
.github/workflows/dev-db-nightly.yml
vendored
Normal file
43
.github/workflows/dev-db-nightly.yml
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
# GITHUB ACTIONS - WORKFLOW
|
||||
|
||||
# Build the database dev docker image with the latest database dump every night
|
||||
# so that developers don't have to manually build it themselves.
|
||||
|
||||
name: Nightly Dev DB Image
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: datatracker-db
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get Current Date as Tag
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +'%Y%m%d')"
|
||||
|
||||
- name: Docker Build & Push Action
|
||||
uses: mr-smithers-excellent/docker-build-push@v5.6
|
||||
with:
|
||||
image: ${{ env.IMAGE_NAME }}
|
||||
tags: nightly-${{ steps.date.outputs.date }}, latest
|
||||
registry: ${{ env.REGISTRY }}
|
||||
dockerfile: docker/db.Dockerfile
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
Loading…
Reference in a new issue