From af4693798400b712e0cb282c5f9c69854b44bb02 Mon Sep 17 00:00:00 2001 From: Kai Reichart Date: Wed, 27 Nov 2024 13:48:00 +0100 Subject: [PATCH] git checkout --- .github/workflows/build-docker.yml | 8 +++++--- Dockerfile | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 Dockerfile diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 6f2ec12..ec23c8d 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -19,12 +19,14 @@ jobs: container: image: docker:27.4.0-rc.2-dind-alpine3.20 steps: + - name: Install git + run: apk add --no-cache git - name: Clone Repository - run: git clone https://wf:${{ github.token }}@{{ github.server_url }}/{{ github.repository_owner }}/{{ github.repository }}.git + run: git clone https://wf:${{ github.token }}@{{ github.server_url#https:// }}/{{ github.repository_owner }}/{{ github.repository }}.git {{ github.workspace }} - name: Check Out Branch run: | - cd - git checkout + cd ${{ github.workspace }} + git checkout ${{ github.ref }} - name: Build Docker Container run: | docker build -t ${{ inputs.tag }} ${{ inputs.source }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1ca893e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM alpine + +RUN echo "Hello, World!" > /hello.txt