diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dc31cf10..65b00dde 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..ae640f68 --- /dev/null +++ b/.github/workflows/release.yml @@ -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