Skip to content

Create docker-image.yml #1

Create docker-image.yml

Create docker-image.yml #1

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "gh-actions" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout source code
- uses: actions/checkout@v4
with:
ref: 'gh-actions'
# Actual build docker image
- name: Build the Docker image
run: docker build . --file Dockerfile --build-arg OEDATAREP_RELEASE=$OEDATAREP_RELEASE --tag oedatarep/oedatarep-invenio-rdm:$OEDATAREP_RELEASE
# Login to Docker Hub
- name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Push image to registry
- name: Build and push Docker images
uses: docker/[email protected]
with:
push: true
tags: oedatarep/oedatarep-invenio-rdm:$OEDATAREP_RELEASE