fixing pipeline
All checks were successful
Master Build / Build and Push Docker Image (arm64 and amd64) (push) Successful in 3m49s
All checks were successful
Master Build / Build and Push Docker Image (arm64 and amd64) (push) Successful in 3m49s
This commit is contained in:
75
.github/workflows/master.yml
vendored
75
.github/workflows/master.yml
vendored
@@ -5,93 +5,38 @@ on:
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
build_amd64:
|
||||
name: Build and Push Docker Image (amd64)
|
||||
build_multiarch:
|
||||
name: Build and Push Docker Image (arm64 and amd64)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.ivanch.me
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Available platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
|
||||
- name: Build Docker image and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_USERNAME }}/kasbot:latest
|
||||
platforms: linux/amd64
|
||||
tags: git.ivanch.me/ivanch/kasbot/kasbot:latest
|
||||
platforms: linux/arm64,linux/amd64
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
||||
build_arm64:
|
||||
name: Build and Push Docker Image (arm64)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Available platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
|
||||
- name: Build Docker image and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_USERNAME }}/kasbot:latest
|
||||
platforms: linux/arm64
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
||||
|
||||
deploy:
|
||||
name: Update running container
|
||||
runs-on: ubuntu-latest
|
||||
needs: build_arm64
|
||||
|
||||
steps:
|
||||
- name: Recreate container
|
||||
uses: appleboy/ssh-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
key: ${{ secrets.KEY }}
|
||||
port: ${{ secrets.PORT }}
|
||||
script: |
|
||||
cd docker/kasbot
|
||||
docker-compose down
|
||||
docker-compose rm
|
||||
docker-compose pull
|
||||
docker-compose up -d
|
||||
|
Reference in New Issue
Block a user