chore(deps): bump @remix-run/router and react-router-dom #13
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Container image building | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| outputs: | |
| SHA_COMMIT: ${{ steps.vars.outputs.SHA_COMMIT }} | |
| GIT_TAG: ${{ steps.vars.outputs.GIT_TAG }} | |
| BRANCH: ${{ steps.vars.outputs.BRANCH }} | |
| LATEST_TAG: ${{ steps.vars.outputs.LATEST_TAG }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Needed for getting Git Tags | |
| - name: Determine Image Tags | |
| id: vars | |
| run: | | |
| # Checking if the event comes from PR or Branch | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| # PR values | |
| SHA_COMMIT=$(echo ${{ github.event.pull_request.head.sha }}) | |
| BRANCH_NAME=${{ github.event.pull_request.head.ref }} | |
| echo "Changes comming from PR: $BRANCH_NAME/$SHA_COMMIT" | |
| else | |
| # Push values | |
| SHA_COMMIT=$(echo ${{ github.sha }}) | |
| BRANCH_NAME=${GITHUB_REF##*/} | |
| echo "Changes comming from Push: $BRANCH_NAME/$SHA_COMMIT" | |
| fi | |
| echo "SHA_COMMIT=$SHA_COMMIT" >> $GITHUB_OUTPUT | |
| echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT | |
| # Getting LATEST_TAG | |
| if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then | |
| LATEST_TAG="latest" | |
| fi | |
| echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_OUTPUT | |
| # Getting version tag if available | |
| GIT_TAG=$(git tag --points-at HEAD | head -n 1) | |
| if [[ -n "$GIT_TAG" ]]; then | |
| echo "Detected Git Tag: $GIT_TAG" | |
| else | |
| GIT_TAG="$SHA_COMMIT" | |
| fi | |
| echo "GIT_TAG=$GIT_TAG" >> $GITHUB_OUTPUT | |
| echo "Building Tags:" | |
| echo " * SHA_COMMIT: ${SHA_COMMIT}" | |
| echo " * BRANCH_NAME: ${BRANCH_NAME}" | |
| echo " * GIT TAG: ${GIT_TAG}" | |
| if [[ $LATEST_TAG == "latest" ]]; then | |
| echo " * Including 'latest' tag" | |
| fi | |
| console: | |
| runs-on: ubuntu-latest | |
| needs: setup | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Login to Quay.io | |
| run: | | |
| echo "${{ secrets.QUAY_PASSWORD }}" | podman login quay.io -u "${{ secrets.QUAY_USERNAME }}" --password-stdin | |
| - name: Container image building | |
| run: | | |
| echo "Building ClusterIQ Console (${{ needs.setup.outputs.BRANCH }}/${{ needs.setup.outputs.SHA_COMMIT }})" | |
| podman build \ | |
| --platform linux/amd64 \ | |
| --build-arg VERSION=${{ needs.setup.outputs.GIT_TAG }} \ | |
| --build-arg COMMIT=${{ needs.setup.outputs.SHA_COMMIT }} \ | |
| -t quay.io/${{ secrets.QUAY_ORG_NAME }}/cluster-iq-console:${{ needs.setup.outputs.SHA_COMMIT }} \ | |
| -f ./deployments/containerfiles/Containerfile . | |
| - name: Pushing Hash based image | |
| run: | | |
| podman push quay.io/${{ secrets.QUAY_ORG_NAME }}/cluster-iq-console:${{ needs.setup.outputs.SHA_COMMIT }} | |
| - name: Tagging and Pushing Latest Image | |
| if: ${{ needs.setup.outputs.LATEST_TAG != '' && needs.setup.outputs.LATEST_TAG != null }} | |
| run: | | |
| podman tag \ | |
| quay.io/${{ secrets.QUAY_ORG_NAME }}/cluster-iq-console:${{ needs.setup.outputs.SHA_COMMIT }} \ | |
| quay.io/${{ secrets.QUAY_ORG_NAME }}/cluster-iq-console:${{ needs.setup.outputs.LATEST_TAG }} | |
| podman push quay.io/${{ secrets.QUAY_ORG_NAME }}/cluster-iq-console:${{ needs.setup.outputs.LATEST_TAG }} | |
| - name: Tagging and Puhsing GitTag based image | |
| if: ${{ needs.setup.outputs.GIT_TAG != '' && needs.setup.outputs.GIT_TAG != null }} | |
| run: | | |
| echo "Building Tagged version image: ${{ needs.setup.outputs.GIT_TAG }}" | |
| podman tag \ | |
| quay.io/${{ secrets.QUAY_ORG_NAME }}/cluster-iq-console:${{ needs.setup.outputs.SHA_COMMIT }} \ | |
| quay.io/${{ secrets.QUAY_ORG_NAME }}/cluster-iq-console:${{ needs.setup.outputs.GIT_TAG }} | |
| podman push quay.io/${{ secrets.QUAY_ORG_NAME }}/cluster-iq-console:${{ needs.setup.outputs.GIT_TAG }} | |
| - name: Logout from Quay.io | |
| run: | | |
| podman logout quay.io | |
| final: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - setup | |
| - console | |
| steps: | |
| - name: Validating | |
| run: | | |
| podman pull quay.io/${{ secrets.QUAY_ORG_NAME }}/cluster-iq-console:${{ needs.setup.outputs.SHA_COMMIT }} |