diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ee0242..70fa05a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Build Arka docker image +name: Build Arka Docker image on: push: @@ -6,48 +6,86 @@ on: - "master" jobs: - build: + build_frontend: runs-on: ubuntu-latest steps: - - - name: Checkout + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Checkout frontend uses: actions/checkout@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + path: frontend + - name: Get frontend package version + id: get_frontend_version + run: echo version=$(node -p "require('./frontend/package.json').version") >> ${{ github.workspace }}/frontend_version.txt + - name: Build and push frontend Docker image + uses: docker/build-push-action@v4 + with: + context: ./frontend + file: ./frontend/Dockerfile + push: true + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/arka-frontend:${{ steps.get_frontend_version.outputs.version }} + ${{ secrets.DOCKERHUB_USERNAME }}/arka-frontend:latest + platforms: linux/amd64,linux/arm64 - - - name: Set up QEMU + build_admin_frontend: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - - name: Get Arka backend package version - id: get_version - run: echo version=$(node -p "require('./backend/package.json').version") >> $GITHUB_OUTPUT - - - name: Build and push + - name: Checkout admin_frontend + uses: actions/checkout@v3 + with: + path: admin_frontend + - name: Get admin_frontend package version + id: get_admin_frontend_version + run: echo version=$(node -p "require('./admin_frontend/package.json').version") >> ${{ github.workspace }}/admin_frontend_version.txt + - name: Build and push admin_frontend Docker image uses: docker/build-push-action@v4 with: - context: ./backend + context: ./admin_frontend + file: ./admin_frontend/Dockerfile + push: true + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/arka-admin-frontend:${{ steps.get_admin_frontend_version.outputs.version }} + ${{ secrets.DOCKERHUB_USERNAME }}/arka-admin-frontend:latest platforms: linux/amd64,linux/arm64 + + build_backend: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Checkout backend + uses: actions/checkout@v3 + with: + path: backend + - name: Get backend package version + id: get_backend_version + run: echo version=$(node -p "require('./backend/package.json').version") >> ${{ github.workspace }}/backend_version.txt + - name: Build and push backend Docker image + uses: docker/build-push-action@v4 + with: + context: ./backend file: ./backend/Dockerfile push: true tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/arka:${{ steps.get_version.outputs.version }} - ${{ secrets.DOCKERHUB_USERNAME }}/arka:latest - - - name: Create GitHub release + ${{ secrets.DOCKERHUB_USERNAME }}/arka-backend:${{ steps.get_backend_version.outputs.version }} + ${{ secrets.DOCKERHUB_USERNAME }}/arka-backend:latest + platforms: linux/amd64,linux/arm64 + - name: Create GitHub release uses: "marvinpinto/action-automatic-releases@6273874b61ebc8c71f1a61b2d98e234cf389b303" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: ${{ steps.get_version.outputs.version }} + automatic_release_tag: ${{ steps.get_backend_version.outputs.version }} prerelease: false - title: Release ${{ steps.get_version.outputs.version }} - - - name: Trigger pipeline + title: Arka ${{ steps.get_backend_version.outputs.version }} + - name: Trigger pipeline run: ${{ secrets.PIPELINE_TRIGGER }} \ No newline at end of file diff --git a/admin_frontend/package-lock.json b/admin_frontend/package-lock.json index f0aea61..fa1ed2d 100644 --- a/admin_frontend/package-lock.json +++ b/admin_frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "admin_frontend", - "version": "0.1.0", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "admin_frontend", - "version": "0.1.0", + "version": "1.0.0", "dependencies": { "@emotion/react": "^11.11.3", "@emotion/styled": "^11.11.0", diff --git a/admin_frontend/package.json b/admin_frontend/package.json index 11c39e5..5d8e010 100644 --- a/admin_frontend/package.json +++ b/admin_frontend/package.json @@ -1,6 +1,6 @@ { "name": "admin_frontend", - "version": "0.1.0", + "version": "1.0.0", "private": true, "dependencies": { "@emotion/react": "^11.11.3", diff --git a/backend/package.json b/backend/package.json index 4b048ee..0de8d5d 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "arka", - "version": "1.1.7", + "version": "1.0.0", "description": "ARKA - (Albanian for Cashier's case) is the first open source Paymaster as a service software", "type": "module", "directories": { diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 7581fb1..f70899f 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "arka_frontend", - "version": "0.1.0", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "arka_frontend", - "version": "0.1.0", + "version": "1.0.0", "dependencies": { "@babel/plugin-proposal-private-property-in-object": "7.21.11", "@emotion/react": "^11.11.1", diff --git a/frontend/package.json b/frontend/package.json index 3cc1139..d5208fa 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "arka_frontend", - "version": "0.1.0", + "version": "1.0.0", "private": true, "dependencies": { "@babel/plugin-proposal-private-property-in-object": "7.21.11",