Skip to content

Commit

Permalink
👷 add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdd committed Aug 22, 2024
1 parent 11f27eb commit 254453b
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
context: .
file: ./docker/flowg.dockerfile
tags: " linksociety/flowg:latest"
tags: "linksociety/flowg:latest"
push: false
load: true
cache-from: type=local,src=/tmp/.buildx-cache
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: release

on:
release:
types:
- published

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: checkout@scm
uses: actions/checkout@v4

- name: setup@docker
uses: docker/setup-buildx-action@v3

- name: login@docker
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: cache@docker
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: build@docker
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/flowg.dockerfile
tags: |
linksociety/flowg:latest
linksociety/flowg:${{ github.event.release.tag_name }}
push: true
load: true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

0 comments on commit 254453b

Please sign in to comment.