Skip to content

Use Dependabot to check that the base image is up to date #19

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

Merged
merged 1 commit into from
Jan 4, 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
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: docker
directory: "/"
schedule:
interval: weekly
59 changes: 59 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Push

on: [push, workflow_dispatch]

jobs:
build:
name: Build and test Docker Image
runs-on: ubuntu-20.04
timeout-minutes: 10

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Cache Docker Layers
uses: satackey/[email protected]
continue-on-error: true

- name: Login to Docker Hub
uses: azure/docker-login@v1
continue-on-error: true
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build Docker Image
run: docker build --tag axiom/docker-erddap:latest .

- name: Run Docker Image in Background
run: docker run -d -p 8080:8080 axiom/docker-erddap:latest

- name: Check that ERDDAP Docker Image will return a 200
uses: ifaxity/wait-on-action@v1
timeout-minutes: 1
with:
resource: http://localhost:8080/erddap/index.html

push:
name: Push latest image to Docker Hub
runs-on: ubuntu-20.04
timeout-minutes: 10
needs: build
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') && github.repository == 'axiom-data-science/docker-erddap'

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Cache Docker Layers
uses: satackey/[email protected]

- name: Login to Docker Hub
uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push latest image to Docker Hub if on master or main branch of Axiom's repo
run: docker push axiom/docker-erddap:latest
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ This repository will **not** back-port changes from the upstream image to existi
(for example - SHA512 password hashes) you will have to wait for the next ERDDAP release which will be built with the newest upstream image.
You can also build this image yourself.

Use `latest` image with caution as it follows the upstream image, and is not as thoroughly tested as tagged images.

[Dependabot](https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/keeping-your-dependencies-updated-automatically) is used to automatically make PRs to update the upstream image ([`.github/dependabot.yml`](.github/dependabot.yml)).

## Quickstart

```bash
Expand Down