Skip to content

Commit

Permalink
GitHub actions (#7)
Browse files Browse the repository at this point in the history
* Push only on main branch
  • Loading branch information
soulgarden authored Mar 17, 2024
1 parent bbc710e commit 9a304de
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ permissions:
pull-requests: read
checks: write

env:
DO_PUSH: ${{ github.ref == 'refs/heads/main' }}

jobs:
golangci:
name: lint
Expand Down Expand Up @@ -63,6 +66,7 @@ jobs:
- uses: actions/checkout@v4

- name: Login to Docker Hub
if: ${{ env.DO_PUSH == 'true' }}
uses: docker/#-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
Expand All @@ -74,12 +78,24 @@ jobs:
platforms: linux/amd64,linux/arm64/v8

- name: Build
if: ${{ env.DO_PUSH == 'false' }}
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
push: false
platforms: linux/amd64
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/logfowd:0.0.13
cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/logfowd:latest

- name: Build and push
if: ${{ env.DO_PUSH == 'true' }}
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
push: true
platforms: linux/amd64,linux/arm64/v8
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/logfowd:0.0.12
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/logfowd:0.0.13
cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/logfowd:latest
cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/logfowd:latest,mode=max
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ docker_down dd:
docker-compose down

build:
docker buildx build . -f ./docker/Dockerfile -t soulgarden/logfowd:0.0.12 --platform linux/amd64 --push
docker buildx build . -f ./docker/Dockerfile -t soulgarden/logfowd:0.0.13 --platform linux/amd64 --push

#helm

Expand Down
4 changes: 2 additions & 2 deletions helm/logfowd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.12
version: 0.0.13

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.0.12"
appVersion: "0.0.13"
2 changes: 1 addition & 1 deletion helm/logfowd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ image:
repository: soulgarden/logfowd
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "0.0.12"
tag: "0.0.13"

imagePullSecrets: [ ]
nameOverride: ""
Expand Down

0 comments on commit 9a304de

Please # to comment.