From b541c40f561dc2cb6b43f11e3d5305669047dfa8 Mon Sep 17 00:00:00 2001 From: nikurasutan Date: Thu, 27 Apr 2023 12:45:35 +0200 Subject: [PATCH] Add docker-image.yml --- .github/workflows/docker-image.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 00000000..08b2d013 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,20 @@ +name: Docker Image CI +on: + push: + tags: + - "*" +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: 'Login to GitHub Container Registry' + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + - name: Build the Docker image + run: "docker build . --file Dockerfile --tag ghcr.io/${{ github.actor }}/cobalt:${{ github.ref_name }}" + - name: Push docker image + run: "docker push ghcr.io/${{ github.actor }}/cobalt:${{ github.ref_name }}" \ No newline at end of file