Skip to content

Commit

Permalink
Merge pull request #5 from sourceboat/feature/use-github-actions
Browse files Browse the repository at this point in the history
Use Github workflows
  • Loading branch information
pehbehbeh authored Mar 24, 2022
2 parents 7f7d2c7 + a9f5eb1 commit 7b99926
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/Edge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build edge image

on:
push:
branches:
- develop

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
sourceboat/rancher-deploy:edge
47 changes: 47 additions & 0 deletions .github/workflows/Stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build stable image

on:
push:
tags:
- '*.*.*'

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
sourceboat/rancher-deploy
flavour: |
latest=true
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit 7b99926

Please sign in to comment.