Skip to content

TEST

TEST #20

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 7 * * WED'
concurrency:
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
permissions:
contents: read
packages: write
jobs:
CI:
continue-on-error: ${{ matrix.config.continue-on-error == 'true' }}
strategy:
matrix:
config:
- {dockerfile: 'ubuntu', tag: 'latest', build_args: 'TAG=latest'}
- {dockerfile: 'ubuntu', tag: 'dev', build_args: 'TAG=dev'}
runs-on: ubuntu-latest
env:
docker-tag: ghcr.io/ornl-mdf/containers/${{ matrix.config.dockerfile }}:${{ matrix.config.tag }}
steps:
- name: Checkout out code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build new image and load it into Docker to test
uses: docker/build-push-action@v4
with:
tags: ${{ env.docker-tag }}
file: docker/${{ matrix.config.dockerfile }}
build-args: ${{ matrix.config.build_args }}
pull: true
push: false
load: true
- name: Push Docker images for Github Container Registry
uses: docker/build-push-action@v3
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
with:
tags: ${{ env.docker-tag }}
file: docker/${{ matrix.config.dockerfile }}
build-args: ${{ matrix.config.build_args }}
push: true