Skip to content

Merge pull request #3 from grycap/devel #64

Merge pull request #3 from grycap/devel

Merge pull request #3 from grycap/devel #64

Workflow file for this run

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