From 36fb634011b0d6b07c218e802226bd1c72dd097e Mon Sep 17 00:00:00 2001 From: Eric Gullickson <16152721+ericgullickson@users.noreply.github.com> Date: Tue, 15 Jul 2025 20:35:43 -0500 Subject: [PATCH] Added Workflow --- .github/FUNDING.yml | 14 ++++++ .github/workflows/build-and-push-image.yml | 51 ++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 .github/FUNDING.yml create mode 100644 .github/workflows/build-and-push-image.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..7ac876a --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,14 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +polar: # Replace with a single Polar username +buy_me_a_coffee: # Replace with a single Buy Me a Coffee username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/workflows/build-and-push-image.yml b/.github/workflows/build-and-push-image.yml new file mode 100644 index 0000000..b5980c6 --- /dev/null +++ b/.github/workflows/build-and-push-image.yml @@ -0,0 +1,51 @@ +name: Build and Push Image to Dockerhub and GHCR + +on: + push: + branches: ["main"] + release: + types: ["published"] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: "${{ secrets.DH_USER }}" + password: "${{ secrets.DH_PASS }}" + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: "${{ secrets.GHCR_USER }}" + password: "${{ secrets.GHCR_PAT }}" + + - name: Docker Metadata + id: meta + uses: docker/metadata-action@v5 + with: + context: workflow + images: | + ericgullickson/motovaultpro + ghcr.io/ericgullickson/motovaultpro + tags: | + type=edge,branch=main + type=ref,event=tag + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}