Skip to content

build docker image #381

build docker image

build docker image #381

# This is a basic workflow to help you get started with Actions
name: build docker image
on:
schedule:
- cron: 0 1 * * *
push:
branches: [ main ]
pull_request:
branches: [ main ]
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 }}