From 5f29371e8ea8aeaf24830aeb56fa96e82cb2ab22 Mon Sep 17 00:00:00 2001 From: mkabdelrahman Date: Wed, 4 Sep 2024 21:27:45 +0300 Subject: [PATCH] ci-pipline reverse --- .github/actions/setup-environment/action.yaml | 16 ------ .github/workflows/pipeline.yaml | 57 +++++++++---------- 2 files changed, 27 insertions(+), 46 deletions(-) delete mode 100644 .github/actions/setup-environment/action.yaml diff --git a/.github/actions/setup-environment/action.yaml b/.github/actions/setup-environment/action.yaml deleted file mode 100644 index e71152f..0000000 --- a/.github/actions/setup-environment/action.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: "Setup Environment" -description: "Sets up the environment by checking out code, setting up Go, and installing Task CLI." -runs: - using: "composite" - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-go@v5 - with: - go-version: stable - cache: false - - - name: Install Task CLI - uses: arduino/setup-task@v2 - with: - version: 3.x diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 1d4adf8..d400c89 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -7,18 +7,17 @@ jobs: name: Lint Application runs-on: ubuntu-latest steps: - - name: Checkout Code - uses: actions/checkout@v4 - - - name: Copy GitHub Actions Directory - run: cp -r .github $GITHUB_WORKSPACE/ - - - name: Setup Environment - uses: ./.github/actions/setup-environment - + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: stable + cache: false + - name: Install Task CLI + uses: arduino/setup-task@v2 + with: + version: 3.x - name: Install GolangCI-Lint run: task instal-golangci-lint - - name: Run Lint run: task lint @@ -27,15 +26,15 @@ jobs: runs-on: ubuntu-latest needs: lint steps: - - name: Checkout Code - uses: actions/checkout@v4 - - - name: Copy GitHub Actions Directory - run: cp -r .github $GITHUB_WORKSPACE/ - - - name: Setup Environment - uses: ./.github/actions/setup-environment - + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: stable + cache: false + - name: Install Task CLI + uses: arduino/setup-task@v2 + with: + version: 3.x - name: Run Test run: task test @@ -44,23 +43,21 @@ jobs: runs-on: ubuntu-latest needs: test steps: - - name: Checkout Code - uses: actions/checkout@v4 - - - name: Copy GitHub Actions Directory - run: cp -r .github $GITHUB_WORKSPACE/ - - - name: Setup Environment - uses: ./.github/actions/setup-environment - + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: stable + cache: false + - name: Install Task CLI + uses: arduino/setup-task@v2 + with: + version: 3.x - name: Build run: task build - - name: Copy Files run: | mkdir artifacts cp bin/linux_amd64/api artifacts/. - - name: Archive Artifacts uses: actions/upload-artifact@v4 with: