-
Notifications
You must be signed in to change notification settings - Fork 21
57 lines (49 loc) · 1.75 KB
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# 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:
name: Build Docker container
# 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