Skip to content

Commit

Permalink
Added DockerHub release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pierreavn committed Dec 27, 2024
1 parent 0367855 commit 1abfabf
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Build and release binary
on:
push:
tags:
- '*'
- v*
workflow_dispatch:

jobs:
build-release-binary:
Expand Down
52 changes: 40 additions & 12 deletions .github/workflows/build-release-docker.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,47 @@
name: Build and Release Docker
name: Build and release Docker

on:
schedule:
- cron: "30 1 * * *"
workflow_run:
workflows: ["Build and release binary"]
types:
- completed
workflow_dispatch:

jobs:
build-release-docker:
runs-on: ubuntu-latest

docker:
runs-on: ubuntu-latest-16-cores
steps:
- uses: actions/checkout@v4

- name: Build Docker image
run: docker build -t verdexlab/verdex .
- name: Checkout repository
uses: actions/checkout@v4

- name: Push Docker image
- name: Get GitHub tag
id: meta
run: |
# TODO
curl --silent "https://api.github.com/repos/verdexlab/verdex/releases/latest" | jq -r .tag_name | xargs -I {} echo TAG={} >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: verdexlab/verdex:latest,verdexlab/verdex:${{ steps.meta.outputs.TAG }}

- name: Update DockerHub description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
repository: verdexlab/verdex

0 comments on commit 1abfabf

Please sign in to comment.