Skip to content

Update docker-image.yml #5

Update docker-image.yml

Update docker-image.yml #5

Workflow file for this run

name: Docker Image CI
on:
push:
branches:
- main
- devel
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: GHCR login
env:
GHCR_USERNAME: ${{ github.actor }}
GHCR_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: echo "${GHCR_TOKEN}" | docker login ghcr.io --username "${GHCR_USERNAME}" --password-stdin
- name: Build the Docker image
run: |
GHCR_IMAGE=ghcr.io/grycap/oscar-metrics
if [[ $GITHUB_REF == refs/heads/devel ]]; then
TAGS="--tag ${GHCR_IMAGE}:devel"
else
TAGS="${GHCR_IMAGE}:latest"
fi
docker build . --file Dockerfile --output "type=image,push=true" ${TAGS}