Skip to content

Commit

Permalink
ci: update ci and cd
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielrufino committed Oct 27, 2024
1 parent 4dafec9 commit ab72b10
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ on:
- main

jobs:
publish:
name: Publish Image
dockerfile-cd:
name: Dockerfile CD
runs-on: ubuntu-latest
steps:
- uses: gabrielrufino/check-ci@main
- uses: actions/checkout@v4
- run: docker image build -t strabot/telegram:latest -t strabot/telegram:$(npm pkg get version | sed 's/"//g') .
- run: docker login -u strabot -p ${{ secrets.DOCKER_HUB_TOKEN }}
- run: docker image push -a strabot/telegram
- uses: peter-evans/dockerhub-description@v3
- run: |
IMAGE_VERSION=$(npm pkg get version | sed 's/"//g')
echo $IMAGE_VERSION
echo "IMAGE_VERSION=$IMAGE_VERSION" >> $GITHUB_ENV
- uses: gabrielrufino/dockerfile-cd@main
with:
username: strabot
password: ${{ secrets.DOCKER_HUB_TOKEN }}
repository: strabot/telegram
image-name: strabot/telegram
image-version: ${{ env.IMAGE_VERSION }}
registry-username: strabot
registry-token: ${{ secrets.DOCKER_HUB_TOKEN }}
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ on:
- workflow_dispatch

jobs:
ci:
name: CI Job
node-ci:
name: Node CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gabrielrufino/node-ci@v3
dockerfile-ci:
name: Dockerfile CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gabrielrufino/dockerfile-ci@v2

concurrency:
Expand Down

0 comments on commit ab72b10

Please sign in to comment.