Publish imSim latest Docker image #80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CI workflow to publish the imSim:latest docker image. | |
# | |
# Image is built upon the latest release lsst_dist image. | |
# i.e., https://pipelines.lsst.io/install/docker.html | |
# | |
# Author: Stuart McAlpine ([email protected]) | |
name: Publish imSim latest Docker image | |
on: | |
# Can be triggered to run manually. | |
workflow_dispatch: | |
# Runs automatically every Satuarday at 7pm. | |
schedule: | |
- cron: '0 19 * * 6' | |
# Login to dockerhub, build, and publish. | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set current date as env variable | |
run: echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: lsstdesc/imsim-env:latest | |
build-args: BUILD_DATE=${{ env.NOW }} |