From 87bfc4372eaba84f90d12d64b75655641d923104 Mon Sep 17 00:00:00 2001 From: Niklas van Schrick Date: Tue, 14 Nov 2023 19:03:36 +0100 Subject: [PATCH] Add docker build --- .github/workflows/build.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ed7b030 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,21 @@ +name: Docker Build + +on: + push: + +permissions: + packages: write + +jobs: + docker-build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build Image + run: docker build . -f Dockerfile -t ghcr.io/taucher2003/gitlab-pipeline-action:${{ github.sha }} + - name: Login to Registry + run: echo ${{ secrets.GITHUB_TOKEN }} | docker login -u $ --password-stdin ghcr.io + - name: Push image + run: | + docker push ghcr.io/taucher2003/gitlab-pipeline-action:${{ github.sha }}