Skip to content

Commit

Permalink
Added additional Docker workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
davisdre committed Sep 11, 2024
1 parent fdf0625 commit 397a067
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/docker-image-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docker image (main)

on:
push:
branches:
- "main"

jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ vars.DOCKERHUB_USERNAME }}/littlelink:latest
24 changes: 24 additions & 0 deletions .github/workflows/docker-image-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Docker image (release)

on:
release:
types: [created] # Triggers when a release is created

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

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

- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ vars.DOCKERHUB_USERNAME }}/littlelink:${{ github.event.release.tag_name }}

0 comments on commit 397a067

Please sign in to comment.