Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Update GH actions. (#345)
Browse files Browse the repository at this point in the history
Ensure we build and test the deployment of the docker images.
  • Loading branch information
cdmatters authored Nov 20, 2022
1 parent 68b9362 commit c57c74a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
name: Build & deploy Docker images

on:
schedule:
- cron: "0 6,18 * * *"
push:
paths:
- "docker/Dockerfile*"
Expand All @@ -18,20 +16,22 @@ jobs:
matrix:
distro: ["xenial", "bionic", "focal"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: ${{ format('Build {0} image (& Publish - Release Only)', matrix.distro) }}
uses: docker/build-push-action@v1
submodules: 'recursive'
- name: Docker login
uses: docker/login-action@v2
with:
username: edran
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ format('fairnle/nle-{0}', matrix.distro) }}
dockerfile: ${{ format('docker/Dockerfile-{0}', matrix.distro) }}
tags: dev
- name: ${{ format('Build & Publish `dev` {0} image', matrix.distro) }}
uses: docker/build-push-action@v2
with:
file: ${{ format('docker/Dockerfile-{0}', matrix.distro) }}
tags: ${{ format('fairnle/nle-{0}', matrix.distro) }}:latest
tag_with_sha: true
add_git_labels: true
push: ${{ github.ref == 'main' || ( github.event_name == 'release' && github.even.action == 'released' ) }}
push: false # Build on PR only.
- name: Check Version Matches Release Tag (Release Only)
if: github.event_name == 'release' && github.event.action == 'released'
run: |
Expand All @@ -40,12 +40,11 @@ jobs:
[[ "${{ github.event.release.tag_name }}" == "v$(cat version.txt)" ]]
- name: Push Version Tag (Release Only)
if: github.event_name == 'release' && github.event.action == 'released'
uses: docker/build-push-action@v1
uses: docker/build-push-action@v2
with:
username: edran
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ format('fairnle/nle-{0}', matrix.distro) }}
dockerfile: ${{ format('docker/Dockerfile-{0}', matrix.distro) }}
tags: ${{ github.event.release.tag_name }},latest
file: ${{ format('docker/Dockerfile-{0}', matrix.distro) }}
tags: |
${{ format('fairnle/nle-{0}', matrix.distro) }}:latest,
${{ format('fairnle/nle-{0}', matrix.distro) }}:${{ github.event.release.tag_name }}
add_git_labels: true
push: true
1 change: 1 addition & 0 deletions docker/Dockerfile-bionic
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04

ARG PYTHON_VERSION=3.8
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub

RUN apt-get update && apt-get install -yq \
bison \
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile-focal
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# -*- mode: dockerfile -*-

FROM nvidia/cuda:11.0-devel-ubuntu20.04
FROM nvidia/cuda:11.4.3-devel-ubuntu20.04

ARG PYTHON_VERSION=3.8
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub

RUN apt-get update && apt-get install -yq \
bison \
Expand Down

0 comments on commit c57c74a

Please sign in to comment.