From e915ce1de3f4c69481e63ef5fa6b90290de89c44 Mon Sep 17 00:00:00 2001 From: Kai Reichart Date: Wed, 27 Nov 2024 14:17:15 +0100 Subject: [PATCH] use checkout action --- .github/workflows/build-docker.yml | 8 +------- .github/workflows/build-go.yml | 15 ++------------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 84a5c66..fdb9644 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -20,13 +20,7 @@ jobs: image: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/pipeline-container/dind:27.4.0-rc2 steps: - name: Clone Repository - run: | - URL=${${{ github.server_url }}#http://} - git clone https://wf:${{ github.token }}@$URL/${{ github.repository_owner }}/${{ github.repository }}.git ${{ github.workspace }} - - name: Check Out Branch - run: | - cd ${{ github.workspace }} - git checkout ${{ github.ref }} + uses: https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW-CICD/checkout@main - name: Build Docker Container run: | docker build -t ${{ inputs.tag }} ${{ inputs.source }} diff --git a/.github/workflows/build-go.yml b/.github/workflows/build-go.yml index d23b495..131ec7b 100644 --- a/.github/workflows/build-go.yml +++ b/.github/workflows/build-go.yml @@ -26,18 +26,7 @@ jobs: image: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/pipeline-container/go:1.23 steps: - name: Clone Repository - run: | - URL_WITH_HTTP=${{ github.server_url }} - URL=${URL_WITH_HTTP#http://} - URL=${URL#https://} - git clone http://wf:${{ github.token }}@${URL}/${{ github.repository }}.git ${{ github.workspace }} - - name: Check Out Branch - run: | - cd ${{ github.workspace }} - git checkout ${{ github.ref }} - - name: Set up Go - run: | - go version - - name: Run go test + uses: https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW-CICD/checkout@main + - name: Run go build run: | go build -o ${{ inputs.target }} ${{ inputs.source }}