Skip to content

Commit

Permalink
Merge branch 'master' into fix/reliance-on-complete-column-order
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs authored Feb 4, 2022
2 parents 46b22ac + 35d6938 commit fd1219f
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 34 deletions.
7 changes: 1 addition & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.183.0/containers/r
{
"name": "covidregionaldata",
"build": {
"dockerfile": "Dockerfile",
// Update VARIANT to pick a specific R version: latest, ... ,4.0.1 , 4.0.0
"args": { "VARIANT": "latest" },
"context": ".."
},
"image": "ghcr.io/epiforecasts/covidregionaldata:master",

// Set *default* container specific settings.json values on container create.
"settings": {
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@


name: Create and publish a Docker image

on:
push:
branches: ['release', 'master']

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:

- name: Cancel previous builds if present
uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout repository
uses: actions/checkout@v2

- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v2
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./.devcontainer/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
24 changes: 0 additions & 24 deletions .github/workflows/check-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,27 +270,3 @@ jobs:
git config --local user.name "GitHub Actions"
Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE, clean = TRUE)"
shell: bash

push_to_registry:
if: github.ref == 'refs/heads/master' && github.repository == 'epiforecasts/covidregionaldata'
name: Push Docker image to GitHub Packages
runs-on: ubuntu-20.04

needs: [R-CMD-check, pkgdown, test-coverage]

steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Login to GitHub Packages
uses: docker/login-action@v1
with:
registry: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to GitHub Packages
uses: docker/build-push-action@v2
with:
context: .
file: .devcontainer/Dockerfile
push: true
tags: docker.pkg.github.com/epiforecasts/covidregionaldata/covidregionaldata:latest
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ Authors@R:
role = "aut",
email = "[email protected]",
comment = c(ORCID = "0000-0003-4413-453X")),
person(given = "Hugo",
family = "Gruson",
role = "aut",
comment = c(ORCID = "0000-0002-4094-1476")),
person(given = "Sophie",
family = "Meakin",
role = "ctb",
Expand All @@ -51,10 +55,6 @@ Authors@R:
family = "Boyes",
role = "ctb",
comment = c(URL = "https://github.com/rboyes")),
person(given = "Hugo",
family = "Gruson",
role = "ctb",
comment = c(ORCID = "0000-0002-4094-1476")),
person(given = "Vang",
family = "Le",
role = "ctb",
Expand Down

0 comments on commit fd1219f

Please sign in to comment.