Skip to content

Commit

Permalink
Update build_release.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenzo Mangani <[email protected]>
  • Loading branch information
lmangani authored Nov 6, 2023
1 parent 9e27233 commit 7799cc1
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
build:
name: 'Build & Publish'
runs-on: ubuntu-latest

steps:
- uses: 'actions/checkout@v3'
with:
Expand Down Expand Up @@ -48,37 +47,44 @@ jobs:
npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}


node:
name: 'Build & Publish Node'
runs-on: ubuntu-latest
needs: build
steps:
- uses: 'actions/checkout@v3'
with:
ref: ${{ github.ref }}
- name: Check Docker secret presence
id: checkdocker
shell: bash
run: |
if [ "$SECRET" == "" ]; then
echo ::set-output name=secretspresent::false
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
uses: docker/setup-qemu-action@v3.0.0
with:
platforms: amd64, arm64
- name: Set up Docker Buildx
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3.0.0

- name: Login to DockerHub
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/login-action@v2.0.0
uses: docker/login-action@v3.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push to Docker Hub
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/build-push-action@v3.0.0
uses: docker/build-push-action@v5.0.0
with:
platforms: linux/amd64, linux/arm64
push: true
Expand All @@ -87,16 +93,14 @@ jobs:
qxip/qryn:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
qxip/cloki:latest
qxip/cloki:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
- name: Log in to the GHCR registry
uses: docker/login-action@v2.0.0
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push to GHCR
uses: docker/build-push-action@v3.0.0
uses: docker/build-push-action@v5.0.0
with:
platforms: linux/amd64, linux/arm64
file: ./Dockerfile
Expand All @@ -105,7 +109,6 @@ jobs:
ghcr.io/metrico/qryn:latest
ghcr.io/metrico/qryn:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
bun:
name: 'Build & Publish Bun'
runs-on: ubuntu-latest
Expand All @@ -127,7 +130,7 @@ jobs:
SECRET: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker QEMU
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3.0.0
with:
platforms: amd64, arm64
- name: Set up Docker Buildx
Expand All @@ -150,13 +153,13 @@ jobs:
qxip/qryn:bun
qxip/qryn:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}-bun
- name: Log in to the GHCR registry
uses: docker/login-action@v2.0.0
uses: docker/login-action@v3.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
uses: docker/build-push-action@v5.0.0
with:
platforms: linux/amd64, linux/arm64
file: ./Dockerfile_bun
Expand Down

0 comments on commit 7799cc1

Please sign in to comment.