Skip to content

Merge pull request #20 from Dhananjhay/main #14

Merge pull request #20 from Dhananjhay/main

Merge pull request #20 from Dhananjhay/main #14

Workflow file for this run

name: Continous Deployment
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
releaseer:
runs-on: ubuntu-latest
steps:
-
name: Create release
id: release-please
uses: google-github-actions/release-please-action@v3
with:
release-type: python
package-name: scicon
-
name: Print Release Info
if: ${{ steps.release-please.outputs.release_created }}
shell: bash
run: |
echo "Release Version: ${{ steps.release-please.outputs.tag_name }}"
outputs:
release_created: ${{ steps.release-please.outputs.releases_created }}
releases: ${{ steps.release-please.outputs.releases }}
tag_name: ${{ steps.release-please.outputs.tag_name }}
build:
runs-on: ubuntu-latest
needs: releaseer
if : ${{ needs.releaseer.outputs.release_created }}
strategy:
matrix:
python-version: [3.9]
steps:
-
name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 1
-
name: Fetch Release Tags
id: metadata
run: |
echo "Creating Release Metadata"
echo "Release Ver: ${{ needs.releaseer.outputs.releases }}"
echo "Release Tag: ${{ needs.releaseer.outputs.tag_name }}"
# REGISTRY="images.canfar.net/"
# echo REGISTRY=${REGISTRY} >> $GITHUB_OUTPUT
# IMAGE="canfar/base"
# echo IMAGE=${IMAGE} >> $GITHUB_OUTPUT
# TAG=${{ matrix.info.tag_name }}
# echo TAG=${TAG} >> $GITHUB_OUTPUT
# echo IMAGE_LATEST=${REGISTRY}${IMAGE}:latest >> $GITHUB_OUTPUT
# echo IMAGE_TAGGED=${REGISTRY}${IMAGE}:${TAG} >> $GITHUB_OUTPUT
# -
# name: Setup Docker Buildx Environment
# if: ${{ steps.release-please.outputs.release_created }}
# id: buildx
# uses: docker/setup-buildx-action@v1
# with:
# install: true
# -
# name: Perform CANFAR Harbor Login
# if: ${{ steps.release-please.outputs.release_created }}
# uses: docker/login-action@v1
# with:
# registry: images.canfar.net
# username: ${{ secrets.HARBOR_CANFAR_USERNAME }}
# password: ${{ secrets.HARBOR_CANFAR_PASSWORD }}
# -
# name: Build & Push Production Image
# if: ${{ steps.release-please.outputs.release_created }}
# uses: docker/build-push-action@v3
# id: build-push-production
# with:
# context: .
# file: scicon/images/base/Dockerfile
# platforms: linux/amd64
# build-args:
# PYTHON_VERSION=3.9
# tags: |
# ${{ steps.metadata.outputs.IMAGE_LATEST }}
# ${{ steps.metadata.outputs.IMAGE_TAGGED }}
# push: true
# cache-from: type=gha
# cache-to: type=gha,mode=max