Skip to content

remove cache

remove cache #67

Workflow file for this run

name: build
on:
push
env:
BASE_TAG: user/cmsjson: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
with:
driver: docker
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile
tags: ${{ env.BASE_TAG }}
load: true
- name: Build Docker test image
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile.test
build-contexts: |
base_img=docker-image://${{ env.BASE_TAG }}
# test-json:
# name: Test LFN Conversion
# runs-on: ubuntu-latest
# needs: build
# steps:
# - name: Check out Git repository
# uses: actions/checkout@v2
# - uses: docker/setup-buildx-action@v1
# - name: Build Docker image
# uses: docker/build-push-action@v4
# with:
# context: .
# file: docker/Dockerfile
# load: true
# tags: ${{ env.TEST_TAG }}
# cache-from: type=gha
# cache-to: type=gha,mode=max
# - name: Unit test
# run: |
# docker run --rm ${{ env.TEST_TAG }} python3 -m pytest -v
# test-rpm:
# name: Test JSON RPM package
# runs-on: ubuntu-latest
# needs: build
# steps:
# - name: Check out Git repository
# uses: actions/checkout@v2
# - uses: docker/setup-buildx-action@v1
# - name: Build Docker image
# uses: docker/build-push-action@v4
# with:
# context: .
# file: docker/Dockerfile
# load: true
# tags: ${{ env.TEST_TAG }}
# cache-from: type=gha
# cache-to: type=gha,mode=max
# - name: Unit test
# run: |
# docker run --rm ${{ env.TEST_TAG }} bash -c '
# mkdir -p /root/rpmbuild/SOURCES/ &&
# tar -cvf /root/rpmbuild/SOURCES/xrootd-cmsjson.tar.gz . &&
# rpmbuild -bb spec/xrootd-cmsjson.spec
# '
# test-tfc:
# name: Test TFC RPM package
# runs-on: ubuntu-latest
# needs: [test-json,test-rpm]
# steps:
# - name: Check out Git repository
# uses: actions/checkout@v2
# - uses: docker/setup-buildx-action@v1
# - name: Build Docker image
# uses: docker/build-push-action@v4
# with:
# context: .
# file: docker/Dockerfile.rpm
# cache-from: type=gha
# cache-to: type=gha,mode=max
# push-registry:
# name: Push to Registry
# runs-on: ubuntu-latest
# needs: test-tfc
# if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release'
# steps:
# - name: Check out Git repository
# uses: actions/checkout@v2
# - uses: docker/setup-buildx-action@v1
# - name: Build Docker image
# uses: docker/build-push-action@v4
# with:
# context: .
# file: docker/Dockerfile
# load: true
# tags: ${{ env.TEST_TAG }}
# cache-from: type=gha
# cache-to: type=gha,mode=max
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Tag image
# run: |
# docker tag ${{ env.TEST_TAG }} ${{ env.LATEST_TAG }}
# - name: Push to registry
# run: docker push ${{ env.LATEST_TAG }}