Skip to content

Commit

Permalink
chore(CI): build docker image for branches on request
Browse files Browse the repository at this point in the history
  • Loading branch information
silvester-pari committed Nov 23, 2023
1 parent 8aa3f60 commit c38346d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build_and_push_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: [Dev] Build and push Docker Image for branches

on: workflow_dispatch

jobs:
push_to_registry:
name: Build and push Docker image to Docker Hub

runs-on: ubuntu-latest

steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@main
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
path: ./
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: eoepca/open-science-catalog-frontend
tags: "v${{ steps.package-version.outputs.current-version }}-${{ github.head_ref || github.ref_name }}"
19 changes: 0 additions & 19 deletions .github/workflows/bump_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,3 @@ jobs:
env:
NEW_TAG: ${{ steps.version-bump.outputs.newTag }}
run: echo "new tag $NEW_TAG"

push_to_registry:
name: Build and push Docker image to Docker Hub

runs-on: ubuntu-latest

needs: bump-version

steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
path: ./
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: eoepca/open-science-catalog-frontend
tags: "${{ needs.bump-version.outputs.current-version }}-${{ github.head_ref || github.ref_name }}"

0 comments on commit c38346d

Please sign in to comment.