Spack configuration #8
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
# Workflow to build the development Docker image | |
name: Periodic Docker build | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on pushes to open pull requests with changes to the Spack or Docker configuration | |
pull_request: | |
paths: | |
- .github/workflows/docker.yml | |
- docker/Dockerfile.devenv | |
- spack.yaml | |
# Triggers the workflow at 00:00 on the first day of every 3 months | |
schedule: | |
- cron: '0 0 1 */3 *' | |
# Cancel jobs running if new commits are pushed | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
# Workflow run - one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "docker" | |
docker: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout the repo | |
with: | |
persist-credentials: false | |
uses: actions/checkout@v4 | |
- name: Setup Docker buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log into GitHub Container Repository | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
logout: true | |
- name: Build container and push to ghcr | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
file: docker/Dockerfile.devenv | |
tags: ghcr.io/cambridge-iccs/ftorch-dev-env:latest |