From 3bbbbdd0b4cd40c48fd87a2a8d55046aa7e75e37 Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Mon, 6 Nov 2023 20:53:39 +0100 Subject: [PATCH] Create manual_ci.yml Signed-off-by: Lorenzo Mangani --- .github/workflows/manual_ci.yml | 65 +++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/manual_ci.yml diff --git a/.github/workflows/manual_ci.yml b/.github/workflows/manual_ci.yml new file mode 100644 index 00000000..55c672c4 --- /dev/null +++ b/.github/workflows/manual_ci.yml @@ -0,0 +1,65 @@ +name: 'Manual CI+CD' + +on: + workflow_dispatch: + inputs: + TAG_NAME: + description: 'Release Version Tag (0.0.0)' + required: true + +jobs: + bun: + name: 'Build & Publish Bun' + runs-on: ubuntu-latest + steps: + - uses: 'actions/checkout@v3' + with: + ref: ${{ github.ref }} + - name: Check Docker secret presence + id: checkdocker + shell: bash + run: | + if [ "$SECRET" == "" ]; then + echo "secretspresent=false" >> $GITHUB_OUTPUT + else + echo "secretspresent=true" >> $GITHUB_OUTPUT + fi + env: + SECRET: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Set up Docker QEMU + if: ${{ steps.checkdocker.outputs.secretspresent }} + uses: docker/setup-qemu-action@v2 + with: + platforms: amd64, arm64 + - name: Set up Docker Buildx + if: ${{ steps.checkdocker.outputs.secretspresent }} + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + if: ${{ steps.checkdocker.outputs.secretspresent }} + uses: docker/login-action@v2.0.0 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push to Docker Hub (bun) + if: ${{ steps.checkdocker.outputs.secretspresent }} + uses: docker/build-push-action@v3.0.0 + with: + platforms: linux/amd64, linux/arm64 + file: ./Dockerfile_bun + push: true + tags: | + qxip/qryn:bun + - name: Log in to the GHCR registry + uses: docker/login-action@v2.0.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push to GHCR (bun) + uses: docker/build-push-action@v3.0.0 + with: + platforms: linux/amd64, linux/arm64 + file: ./Dockerfile_bun + push: true + tags: | + ghcr.io/metrico/qryn:bun