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