Skip to content

Commit

Permalink
tmp: test deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
LoicGombeaud committed Sep 17, 2023
1 parent 6a854d7 commit 49cb005
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,19 @@ on:
push:
branches:
- main
- test
schedule:
- cron: '0 12 * * *'

jobs:
build:
name: Build and push Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo ${{ secrets.ENV_LOCAL }} | base64 -d > .env.local
- run: echo ${{ secrets.GITHUB_TOKEN }} | docker login -u $ --password-stdin $DOCKER_REGISTRY
- run: |
IMAGE_NAME=$DOCKER_REGISTRY/${{ github.repository_owner }}/$IMAGE_REPOSITORY
IMAGE_NAME=$(echo $IMAGE_NAME | tr '[A-Z]' '[a-z]') # to lowercase
docker build . -t $IMAGE_NAME:latest
docker build . -t $IMAGE_NAME:$(date +%F)
docker push $IMAGE_NAME:latest
docker push $IMAGE_NAME:$(date +%F)
deploy:
needs: build
name: Deploy the new image
runs-on: ubuntu-latest
steps:
- run: >
IMAGE_NAME=$DOCKER_REGISTRY/${{ github.repository_owner }}/$IMAGE_REPOSITORY
IMAGE_NAME=$(echo $IMAGE_NAME | tr '[A-Z]' '[a-z]') # to lowercase
echo IMAGE_NAME=$IMAGE_NAME
curl
-u admin:${{ secrets.KEEL_PASSWORD }}
-d "{'name':'$IMAGE_NAME', 'tag':'latest'}"
Expand Down

0 comments on commit 49cb005

Please sign in to comment.