MHO/Github actions
feat: add GH actions
This commit is contained in:
parent
b60bd3120b
commit
8463919b66
3 changed files with 86 additions and 0 deletions
28
.github/workflows/image-dev.yml
vendored
Normal file
28
.github/workflows/image-dev.yml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
name: build our image for latest
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- dev-1.4
|
||||
|
||||
jobs:
|
||||
build-dev:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: install buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Available platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
- name: login to docker hub
|
||||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||
- name: build the image
|
||||
run: |
|
||||
docker buildx build --push \
|
||||
--tag mhzawadi/flame:dev \
|
||||
--platform linux/amd64,linux/arm64 .
|
26
.github/workflows/image-latest.yml
vendored
Normal file
26
.github/workflows/image-latest.yml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
name: build our image for latest
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: install buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Available platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
- name: login to docker hub
|
||||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||
- name: build the image
|
||||
run: |
|
||||
docker buildx build --push \
|
||||
--tag mhzawadi/flame:latest \
|
||||
--platform linux/amd64,linux/arm64 .
|
32
.github/workflows/image-version.yml
vendored
Normal file
32
.github/workflows/image-version.yml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: build our image for a tagged version
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: install buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Available platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
- name: Prepare
|
||||
id: prepare
|
||||
run: |
|
||||
VERSION=${GITHUB_REF#refs/tags/v}
|
||||
echo ::set-output name=version::${VERSION}
|
||||
- name: login to docker hub
|
||||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||
- name: build the image
|
||||
run: |
|
||||
docker buildx build --push \
|
||||
--tag "mhzawadi/flame:${{ steps.prepare.outputs.version }}" \
|
||||
--platform linux/amd64,linux/arm64 .
|
Loading…
Add table
Reference in a new issue