Skip to content

Feature: github action ci (#3) #6

Feature: github action ci (#3)

Feature: github action ci (#3) #6

Workflow file for this run

name: pipeline
on:
push
env:
BASE_TAG: user/xrootd-cmstfc:base
LATEST_TAG: ghcr.io/guyzsarun/xrootd-cmsjson:latest
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v2
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile
tags: ${{ env.BASE_TAG }}
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
test-json:
name: Test JSON Conversion
needs: build
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v2
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile
tags: ${{ env.BASE_TAG }}
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Unit test
run: |
docker run --rm ${{ env.BASE_TAG }} python3 -m pytest -v
test-rpm:
name: Package RPM
needs: build
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v2
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile.rpm
load: true
cache-from: type=gha
cache-to: type=gha,mode=max