Skip to content

Lecture04

Lecture04 #109

name: Build and push - service/interactive
on:
push:
paths:
- "services/interactive/**"
- ".github/workflows/**"
branches: ["main"]
tags: ["v*"]
pull_request:
branches: ["main"]
env:
USERNAME: jah
REGISTRY: registry.gitlab.sdu.dk
IMAGE_NAME: bigdatarepo/interactive
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.USERNAME }}
password: ${{ secrets.GITLAB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:services/interactive/"
push: true
tags: ${{ env.REGISTRY }}/${{ env.USERNAME }}/${{ env.IMAGE_NAME }}:latest