use checkout action
This commit is contained in:
parent
4d3282a164
commit
e915ce1de3
2 changed files with 3 additions and 20 deletions
8
.github/workflows/build-docker.yml
vendored
8
.github/workflows/build-docker.yml
vendored
|
@ -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 }}
|
||||
|
|
15
.github/workflows/build-go.yml
vendored
15
.github/workflows/build-go.yml
vendored
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue