Skip to content

Commit

Permalink
Merge branch 'main' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
catttam committed Jul 10, 2024
2 parents 4dc23f7 + 2de8b97 commit 93d5b53
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,32 @@ on:
- devel

jobs:

build:
build-and-push-image:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: GHCR login
- 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: Build the Docker image
- 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
docker build . --file Dockerfile --output "type=image,push=true" --tag ${TAG}
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}

0 comments on commit 93d5b53

Please sign in to comment.