Skip to content

fix: fixing alpine version in dockerfile #15

fix: fixing alpine version in dockerfile

fix: fixing alpine version in dockerfile #15

Workflow file for this run

name: Continous Deployment
on:
push:
tags:
- "v*.*.*"
jobs:
build_and_push:
runs-on: ubuntu-latest
name: Build and push new image to container registries
permissions: # Permissions for GITHUB_TOKEN
contents: read
packages: write
steps:
- name: Login to dockerhub
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
with:
username: bl4ko
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to ghcr.io
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
with:
registry: ghcr.io
username: bl4ko
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@0d103c3126aa41d772a8362f6aa67afac040f80c # v3
- name: Build and push final image
uses: docker/build-push-action@af5a7ed5ba88268d5278f7203fb52cd833f66d6e # v5.2.0
with:
platforms: linux/amd64,linux/arm64
tags: |
bl4ko/homepage:latest
bl4ko/homepage:${{ github.ref_name }}
ghcr.io/bl4ko/homepage:latest
ghcr.io/bl4ko/homepage:${{ github.ref_name }}
push: true
deploy:
name: Deploy application to server
runs-on: ubuntu-latest
needs: build_and_push
steps:
- name: Add key from variable
run: |
echo "${{ secrets.DEPLOY_KEY }}" > ./key && chmod 600 ./key
- name: Install ssh client if not installed
run: |
sudo apt-get update && sudo apt-get install openssh-client -y
- name: Connect to host and update
run: |
ssh -o StrictHostKeyChecking=no -i ./key -p ${{ secrets.DEPLOY_PORT }} ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} '~/.local/bin/kubectl rollout restart deployment/portfolio -n portfolio'