added workflow

This commit is contained in:
Jakub Vavřík
2021-10-05 15:51:13 +02:00
parent b3ec55c7a6
commit 8751c9fd9b

23
.github/workflows/main.yaml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: publish
on: [push]
jobs:
publish-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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 CICD Docker image
run: |
docker build . --tag ghcr.io/ysoftdevs/git-yq:latest
docker run ghcr.io/ysoftdevs/git-yq:latest
docker push ghcr.io/ysoftdevs/git-yq:latest