Skip to content

Merge pull request #4609 from telefonicaid/hardening/coverage-target-fix #51

Merge pull request #4609 from telefonicaid/hardening/coverage-target-fix

Merge pull request #4609 from telefonicaid/hardening/coverage-target-fix #51

name: Publish Docker image (master)
# The workflow will push images for master on every merge
# Ideally, this should be done at dockerhub, but it doesn't support secrets (see https://stackoverflow.com/questions/78446824/use-environment-variables-with-sensible-information-in-docker-hub-autobuild)
on:
push:
branches:
- master
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_TEF_USERNAME }}
password: ${{ secrets.DOCKERHUB_TEF_TOKEN }}
- name: Build Docker image
run: |
export TOKEN=${{ secrets.REPO_ACCESS_TOKEN }}
docker build -t telefonicaiot/fiware-orion:latest --build-arg GIT_REV_ORION=master --secret id=repo_token,env=TOKEN --no-cache -f docker/Dockerfile .
- name: Push Docker image
run: docker push telefonicaiot/fiware-orion:latest