[ci] Attempt to move to reusable workflows

This commit is contained in:
West14
2022-01-10 15:09:19 +02:00
parent bd052cf377
commit f9dcc4e083
3 changed files with 35 additions and 5 deletions
+14
View File
@@ -0,0 +1,14 @@
name: Build Docker Image
on:
push:
jobs:
docker:
name: Build Docker image
runs-on: [linux, x64]
steps:
- uses: ./.github/workflows/build@dev
with:
arch: amd64
+14
View File
@@ -0,0 +1,14 @@
name: Build Docker Image
on:
push:
jobs:
docker:
name: Build Docker image
runs-on: [self-hosted, linux, arm64]
steps:
- uses: ./.github/workflows/build@dev
with:
arch: arm64
@@ -1,13 +1,15 @@
name: ci name: Build Docker Image
on: on:
push: workflow_call:
inputs:
arch:
required: true
type: string
jobs: jobs:
docker: docker:
name: Build Docker image name: Build Docker image
runs-on: [self-hosted, linux, ARM64]
steps: steps:
- -
name: Checkout name: Checkout
@@ -33,7 +35,7 @@ jobs:
name: Build and push name: Build and push
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
platforms: linux/amd64,linux/arm64 platforms: linux/${{ inputs.arch }}
push: ${{ github.ref == 'refs/heads/dev' }} push: ${{ github.ref == 'refs/heads/dev' }}
tags: ${{ secrets.REGISTRY_URL }}/west/telegram-bot:latest, tags: ${{ secrets.REGISTRY_URL }}/west/telegram-bot:latest,
${{ secrets.REGISTRY_URL }}/west/telegram-bot:${{ steps.commit_sha.outputs.sha_short }} ${{ secrets.REGISTRY_URL }}/west/telegram-bot:${{ steps.commit_sha.outputs.sha_short }}