Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
Fix github action
Browse files Browse the repository at this point in the history
  • Loading branch information
sniper7kills committed Nov 27, 2023
1 parent dde80f4 commit 7fc42e2
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: Production
name: Production Push

on:
push:
branches:
- 'production'
release:
types:
- created

jobs:
docker:
Expand All @@ -25,10 +22,8 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push latest
if: github.event_name == 'push'
run: docker/build-push-action@v5 --push --tag runbooksolutions/agent:latest .
-
name: Build and push tag
if: github.event_name == 'release' && github.ref
run: docker/build-push-action@v5 --push --tag runbooksolutions/agent:${{ github.event.release.tag_name }} .
name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: runbooksolutions/agent:latest
29 changes: 29 additions & 0 deletions .github/workflows/release_created.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release Created

on:
release:
types:
- created

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: runbooksolutions/agent:latest, runbooksolutions/agent:${{ github.event.release.tag_name }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dev
name: Staging Push

on:
push:
Expand Down

0 comments on commit 7fc42e2

Please sign in to comment.