Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,45 @@ jobs:
- name: Cargo publish
run: cargo publish
shell: bash
docker-image:
name: Build and push docker images
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

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

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: lowercase repository owner
run: |
echo "OWNER=${GITHUB_REPOSITORY_OWNER,,}" >>$GITHUB_ENV

- name: set the release version (tag)
if: startsWith(github.ref, 'refs/tags/v')
shell: bash
run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Build and push (tag)
uses: docker/build-push-action@v3
if: startsWith(github.ref, 'refs/tags/v')
with:
push: true
tags: ghcr.io/${{ env.OWNER }}/bindle:latest,ghcr.io/${{ env.OWNER }}/bindle:${{ env.RELEASE_VERSION }}

- name: Build and push (main)
uses: docker/build-push-action@v3
if: github.ref == 'refs/heads/main'
with:
push: true
tags: ghcr.io/${{ env.OWNER }}/bindle:canary