Skip to content

Add Jenkinsfile

Add Jenkinsfile #5

name: Build Docker image for EGI trustanchors + IGI Test CA
on:
schedule:
- cron: 0 1 * * *
push:
branches: [ igi-test-ca ]
pull_request:
branches: [ igi-test-ca ]
jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v3
with:
images: |
indigoiam/egi-trustanchors
tags: |
type=sha
type=ref,event=branch
type=ref,event=tag
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}