[action] merge action for release tizen packages using matrix
authorYelin Jeong <yelini.jeong@samsung.com>
Mon, 31 Jul 2023 05:54:39 +0000 (14:54 +0900)
committer추지호/SoC Architecture팀(SR)/삼성전자 <jiho.chu@samsung.com>
Tue, 1 Aug 2023 06:35:27 +0000 (15:35 +0900)
This patch merges actions for release tizen packages.

Signed-off-by: Yelin Jeong <yelini.jeong@samsung.com>
.github/workflows/release-package-aarch64.yml [deleted file]
.github/workflows/release-package-armv7l.yml [deleted file]
.github/workflows/release-package-x86_64.yml [deleted file]
.github/workflows/release-tizen.yml [new file with mode: 0644]

diff --git a/.github/workflows/release-package-aarch64.yml b/.github/workflows/release-package-aarch64.yml
deleted file mode 100644 (file)
index 1e7768c..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-name: release package for aarch64
-
-on:
-  workflow_dispatch:
-
-env:
-  BART_REPO: https://bart.sec.samsung.net/artifactory/aip-rpm-local/NPU_SystemService
-  BART_ID: ${{ secrets.BART_ID }}
-  BART_PW: ${{ secrets.BART_PW }}
-
-jobs:
-  build-and-upload-aarch64:
-    runs-on: [ code-large ]
-    container:
-      image: aip-docker-local.bart.sec.samsung.net/n2s2_docker/bionic:latest
-      # for chroot-based build system
-      options: --privileged
-      credentials:
-        username: ${{ secrets.BART_ID }}
-        password: ${{ secrets.BART_PW }}
-
-    timeout-minutes: 60
-
-    steps:
-      - name: Get current date
-        id: date
-        run: echo "::set-output name=date::$(date +'%Y%m%d')"
-      - name: Clone your repository
-        uses: CODE-Actions/checkout@v2
-      - name: Build packages
-        uses: ./.github/actions/build-tizen
-        with:
-          arch: aarch64
-          output_path: /tmp/rpms
-      - name: Upload artifacts
-        uses: CODE-Actions/upload-artifact@v2
-        with:
-          name: built-package-${{ steps.date.outputs.date }}
-          path: /tmp/rpms
-      - name: Upload to artifactory
-        uses: ./.github/actions/upload-artifacts
-        with:
-          input_path: /tmp/rpms
-          input_type: rpm
-          art_repo: $BART_REPO/aarch64
-          art_id: $BART_ID
-          art_pw: $BART_PW
diff --git a/.github/workflows/release-package-armv7l.yml b/.github/workflows/release-package-armv7l.yml
deleted file mode 100644 (file)
index 70bd785..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-name: release package for armv7l
-
-on:
-  workflow_dispatch:
-
-env:
-  BART_REPO: https://bart.sec.samsung.net/artifactory/aip-rpm-local/NPU_SystemService
-  BART_ID: ${{ secrets.BART_ID }}
-  BART_PW: ${{ secrets.BART_PW }}
-
-jobs:
-  build-and-upload-armv7l:
-    runs-on: [ code-large ]
-    container:
-      image: aip-docker-local.bart.sec.samsung.net/n2s2_docker/bionic:latest
-      # for chroot-based build system
-      options: --privileged
-      credentials:
-        username: ${{ secrets.BART_ID }}
-        password: ${{ secrets.BART_PW }}
-
-    timeout-minutes: 60
-
-    steps:
-      - name: Get current date
-        id: date
-        run: echo "::set-output name=date::$(date +'%Y%m%d')"
-      - name: Clone your repository
-        uses: CODE-Actions/checkout@v2
-      - name: Build packages
-        uses: ./.github/actions/build-tizen
-        with:
-          arch: armv7l
-          output_path: /tmp/rpms
-      - name: Upload artifacts
-        uses: CODE-Actions/upload-artifact@v2
-        with:
-          name: built-package-${{ steps.date.outputs.date }}
-          path: /tmp/rpms
-      - name: Upload to artifactory
-        uses: ./.github/actions/upload-artifacts
-        with:
-          input_path: /tmp/rpms
-          input_type: rpm
-          art_repo: $BART_REPO/armv7l
-          art_id: $BART_ID
-          art_pw: $BART_PW
diff --git a/.github/workflows/release-package-x86_64.yml b/.github/workflows/release-package-x86_64.yml
deleted file mode 100644 (file)
index 3cd1056..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-name: release package for x86_64
-
-on:
-  workflow_dispatch:
-env:
-  BART_REPO: https://bart.sec.samsung.net/artifactory/aip-rpm-local/NPU_SystemService
-  BART_ID: ${{ secrets.BART_ID }}
-  BART_PW: ${{ secrets.BART_PW }}
-
-jobs:
-  build-and-upload-x86_64:
-    runs-on: [ code-large ]
-    container:
-      image: aip-docker-local.bart.sec.samsung.net/n2s2_docker/bionic:latest
-      # for chroot-based build system
-      options: --privileged
-      credentials:
-        username: ${{ secrets.BART_ID }}
-        password: ${{ secrets.BART_PW }}
-
-    timeout-minutes: 60
-
-    steps:
-      - name: Get current date
-        id: date
-        run: echo "::set-output name=date::$(date +'%Y%m%d')"
-      - name: Clone your repository
-        uses: CODE-Actions/checkout@v2
-      - name: Build packages
-        uses: ./.github/actions/build-tizen
-        with:
-          arch: x86_64
-          output_path: /tmp/rpms
-      - name: Upload artifacts
-        uses: CODE-Actions/upload-artifact@v2
-        with:
-          name: built-package-${{ steps.date.outputs.date }}
-          path: /tmp/rpms
-      - name: Upload to artifactory
-        uses: ./.github/actions/upload-artifacts
-        with:
-          input_path: /tmp/rpms
-          input_type: rpm
-          art_repo: $BART_REPO/x86_64
-          art_id: $BART_ID
-          art_pw: $BART_PW
diff --git a/.github/workflows/release-tizen.yml b/.github/workflows/release-tizen.yml
new file mode 100644 (file)
index 0000000..2f7fff3
--- /dev/null
@@ -0,0 +1,46 @@
+name: release package for tizen
+
+on:
+  workflow_dispatch:
+
+env:
+  BART_REPO: https://bart.sec.samsung.net/artifactory
+  BART_ID: ${{ secrets.BART_ID }}
+  BART_PW: ${{ secrets.BART_PW }}
+
+jobs:
+  build-and-release-tizen:
+    runs-on: [ code-large ]
+    strategy:
+      matrix:
+        arch: ['aarch64', 'armv7l', 'x86_64']
+    container:
+      image: aip-docker-local.bart.sec.samsung.net/n2s2_docker/bionic:latest
+      # for chroot-based build system
+      options: --privileged
+      credentials:
+        username: ${{ secrets.BART_ID }}
+        password: ${{ secrets.BART_PW }}
+
+    timeout-minutes: 60
+
+    steps:
+      - name: Get current date
+        id: date
+        run: echo "::set-output name=date::$(date +'%Y%m%d')"
+      - name: Clone your repository
+        uses: CODE-Actions/checkout@v2
+      - name: Build packages
+        uses: ./.github/actions/build-tizen
+        with:
+          arch: ${{ matrix.arch }}
+          output_path: /tmp/rpms
+      - name: Upload artifacts
+        uses: CODE-Actions/upload-artifact@v2
+        with:
+          name: built-package-${{ steps.date.outputs.date }}
+          path: /tmp/rpms
+      - name: Upload to artifactory
+        run: |
+          jf c add art --artifactory-url $BART_REPO --user $BART_ID --password $BART_PW --interactive=false
+          jf rt u --flat "/tmp/rpms/*.rpm" aip-rpm-local/${{ matrix.arch }}/