Add docker-image.yml

This commit is contained in:
nikurasutan 2023-04-27 12:45:35 +02:00
parent 8f93232e81
commit b541c40f56
No known key found for this signature in database
GPG Key ID: 9E7F14C03EF1F271

20
.github/workflows/docker-image.yml vendored Normal file
View File

@ -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 }}"