From 43db69743bd06be79750432c44432d41de634cf1 Mon Sep 17 00:00:00 2001 From: Hussein Galal Date: Fri, 3 Feb 2023 01:04:16 +0200 Subject: [PATCH] Add release workflow (#20) Signed-off-by: galal-hussein --- .github/workflows/release.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7975c67..27ece045 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,6 @@ on: push: tags: - "v*" - jobs: release: permissions: @@ -12,17 +11,31 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Build + - name: Build K3K uses: addnab/docker-run-action@v3 with: registry: docker.io image: rancher/dapper:v0.5.5 options: -v ${{ github.workspace }}:/work -v /var/run/docker.sock:/var/run/docker.sock run: | - pwd && ls -l - - uses: SierraSoftworks/gh-releases@v1.0.7 + cd /work && dapper ci + - name: Publish Binaries + uses: SierraSoftworks/gh-releases@v1.0.7 with: token: ${{ secrets.TOKEN }} overwrite: 'true' files: | - dist/artifacts/k3k \ No newline at end of file + ${{ github.workspace }}/bin/k3k + - name: Docker Hub Login + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v4 + with: + push: true + tags: husseingalal/k3k:${{ github.ref_name }} + file: ./package/Dockerfile + context: . + \ No newline at end of file