Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Add GITHUB Actions workflows to the repo
Browse files Browse the repository at this point in the history
  • Loading branch information
aessing committed Dec 13, 2020
1 parent 7a6b5d6 commit daec1d1
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/container-build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Container Build Test

on:
workflow_dispatch:
push:
branches-ignore:
- main
pull_request:
branches:
- main

jobs:
build:
name: Build container
runs-on: ubuntu-latest

steps:
- name: Checkout code
id: checkout
uses: actions/checkout@v2

- name: Set up QEMU
id: qemu
if: success()
uses: docker/setup-qemu-action@v1
with:
platforms: arm64

- name: Set up Docker Buildx
id: buildx
if: success()
uses: docker/setup-buildx-action@v1

- name: Build container
id: build
if: success()
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: arm64
tags: ${{ github.repository }}:container-build-test-${{ github.RUN_NUMBER }}
58 changes: 58 additions & 0 deletions .github/workflows/container-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Container Release

on:
push:
tags:
- v*
branches: main

jobs:
build:
name: Build container
runs-on: ubuntu-latest

steps:
- name: Checkout code
id: checkout
uses: actions/checkout@v2

- name: Get Tag name
id: tag
if: success()
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}

- name: Set up QEMU
id: qemu
if: success()
uses: docker/setup-qemu-action@v1
with:
platforms: arm64

- name: Set up Docker Buildx
id: buildx
if: success()
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
id: login
if: success()
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESSTOKEN }}

- name: Push to Docker Hub
id: push_dockerhub
if: success()
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: arm64
push: true
tags: ${{ github.repository }}:latest,${{ github.repository }}:latest,${{ github.repository }}:latest,${{ github.repository }}:${{ steps.tag.outputs.tag }}

- name: Image digest Docker Hub
id: digest_dockerhub
if: success()
run: echo ${{ steps.push_dockerhub.outputs.digest }}

0 comments on commit daec1d1

Please sign in to comment.