Skip to content

Commit

Permalink
tmp: test ghcr push
Browse files Browse the repository at this point in the history
  • Loading branch information
LoicGombeaud committed Sep 16, 2023
1 parent 09cf980 commit 2a6c3ee
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Build, push, deploy

env:
DOCKER_REGISTRY: ghcr.io
NAMESPACE: loicag
IMAGE_NAME: compteurs-velo

on:
Expand All @@ -21,10 +20,17 @@ jobs:
- 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: docker build . -t $DOCKER_REGISTRY/$NAMESPACE/$IMAGE_NAME:latest
- run: docker build . -t $DOCKER_REGISTRY/$NAMESPACE/$IMAGE_NAME:$(date +%F)
- run: docker push $DOCKER_REGISTRY/$NAMESPACE/$IMAGE_NAME:latest
- run: docker push $DOCKER_REGISTRY/$NAMESPACE/$IMAGE_NAME:$(date +%F)
- run: |
IMAGE_TAG=$DOCKER_REGISTRY/${{ github.repository_owner }}/$IMAGE_NAME:alpine
IMAGE_TAG=$(echo $IMAGE_TAG | tr '[A-Z]' '[a-z]') # to lowercase
echo IMAGE_TAG=$IMAGE_TAG
docker pull alpine
docker tag alpine $IMAGE_TAG
docker push $IMAGE_TAG
#- run: docker build . -t $DOCKER_REGISTRY/$NAMESPACE/$IMAGE_NAME:latest
#- run: docker build . -t $DOCKER_REGISTRY/$NAMESPACE/$IMAGE_NAME:$(date +%F)
#- run: docker push $DOCKER_REGISTRY/$NAMESPACE/$IMAGE_NAME:latest
#- run: docker push $DOCKER_REGISTRY/$NAMESPACE/$IMAGE_NAME:$(date +%F)
deploy:
needs: build
name: Deploy the new image
Expand Down

0 comments on commit 2a6c3ee

Please sign in to comment.