Skip to content

Commit

Permalink
ADD GitAction to publish docker in Dockerhub for branches
Browse files Browse the repository at this point in the history
  • Loading branch information
fgalan committed May 17, 2024
1 parent 264a9a6 commit dc35a4a
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publishimage-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Docker image (master)

# The workflow will push images on every tag in the format x.y.z
# FIXME PR: change label and branch before merging into master

on:
push:
branches:
#- master
- feature/4004_jexl_expressions

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.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build Docker image
#run: docker build -t telefonicaiot/fiware-orion:latest --build-arg GIT_REV_ORION=master --build-arg REPO_ACCESS_TOKEN=${{ secrets.REPO_ACCESS_TOKEN }} --no-cache -f docker/Dockerfile .
run: docker build -t telefonicaiot/fiware-orion:jexl --build-arg GIT_REV_ORION=feature/4004_jexl_expressions --build-arg REPO_ACCESS_TOKEN=${{ secrets.REPO_ACCESS_TOKEN }} --no-cache -f docker/Dockerfile .

- name: Push Docker image
#run: docker push telefonicaiot/fiware-orion:latest
run: docker push telefonicaiot/fiware-orion:jexl

0 comments on commit dc35a4a

Please sign in to comment.