Skip to content

Commit

Permalink
Add release ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpiper committed Sep 4, 2024
1 parent a728440 commit d4c4d30
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Docker Hub

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- '!v[0-9]+.[0-9]+.[0-9]+[ab][0-9]+'

env:
IMAGE_NAME: csdms/bmi-example-python-grpc4bmi

jobs:

build-and-push:
runs-on: ubuntu-latest

steps:
- name: Get version
id: vars
run: echo "version=${GITHUB_REF:11}" >> $GITHUB_OUTPUT

- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.IMAGE_NAME }}:latest,${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.version }}

0 comments on commit d4c4d30

Please sign in to comment.