Browse Source

Revert "[Infra] A first try of reusable workflows (#3497)" (#3519)

This reverts commit 36112fa26b89e490c869bf6e176c53d853e65c33.
Roman Zabaluev 2 năm trước cách đây
mục cha
commit
270d52882e
2 tập tin đã thay đổi với 15 bổ sung34 xóa
  1. 15 2
      .github/workflows/branch-deploy.yml
  2. 0 32
      .github/workflows/build-template.yml

+ 15 - 2
.github/workflows/branch-deploy.yml

@@ -9,9 +9,9 @@ jobs:
     if: ${{ github.event.label.name == 'status/feature_testing' || github.event.label.name == 'status/feature_testing_public' }}
     runs-on: ubuntu-latest
     steps:
-      - uses: ./.github/workflows/build-template.yaml
+      - uses: actions/checkout@v3
         with:
-          APP_VERSION: $GITHUB_SHA
+          ref: ${{ github.event.pull_request.head.sha }}
       - name: get branch name
         id: extract_branch
         run: |
@@ -19,6 +19,19 @@ jobs:
           echo "tag=${tag}" >> $GITHUB_OUTPUT
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      - name: Set up JDK
+        uses: actions/setup-java@v3
+        with:
+          java-version: '17'
+          distribution: 'zulu'
+          cache: 'maven'
+      - name: Build
+        id: build
+        run: |
+          ./mvnw -B -ntp versions:set -DnewVersion=$GITHUB_SHA
+          ./mvnw -B -V -ntp clean package -Pprod -DskipTests
+          export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
+          echo "version=${VERSION}" >> $GITHUB_OUTPUT
       - name: Set up QEMU
         uses: docker/setup-qemu-action@v2
       - name: Set up Docker Buildx

+ 0 - 32
.github/workflows/build-template.yml

@@ -1,32 +0,0 @@
-name: Maven build template
-on:
-  workflow_call:
-   inputs:
-    APP_VERSION:
-     required: true
-     type: string
-jobs:
-  build:
-    runs-on: ubuntu-latest
-    outputs:
-      version: ${{steps.build.outputs.version}}
-    steps:
-      - uses: actions/checkout@v3
-        with:
-          ref: ${{ github.event.pull_request.head.sha }}
-      - run: |
-          git config user.name github-actions
-          git config user.email github-actions@github.com
-      - name: Set up JDK
-        uses: actions/setup-java@v3
-        with:
-          java-version: '17'
-          distribution: 'zulu'
-          cache: 'maven'
-      - name: Build
-        id: build
-        run: |
-          ./mvnw -B -ntp versions:set -DnewVersion=${{ inputs.APP_VERSION }}
-          ./mvnw -B -V -ntp clean package -Pprod -DskipTests
-          export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
-          echo "version=${VERSION}" >> $GITHUB_OUTPUT