Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
danielguirra authored Mar 21, 2024
1 parent e216da0 commit b1ebef0
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,31 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: docker login
- name: Checkout repository
uses: actions/checkout@v3

- name: Decode secrets
env:
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
DOCKER_URL_IMAGE_TO_PUSH: ${{secrets.DOCKER_URL_IMAGE_TO_PUSH}}
DOCKER_USER: ${{secrets.DOCKER_USER}}
ENVS_JSON: ${{secrets.ENVS_JSON}}
SQLITE_DUMP: ${{secrets.SQLITE_DUMP}}
run: |
echo "$ENVS_JSON" | base64 -d > envs.json
echo "$SQLITE_DUMP" | base64 -d > database.sqlite
- name: Docker login and build
env:
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
DOCKER_URL_IMAGE_TO_PUSH: ${{secrets.DOCKER_URL_IMAGE_TO_PUSH}}
DOCKER_URL_IMAGE_TO_PUSH: ${{secrets.DOCKER_URL_IMAGE_TO_PUSH}}
DOCKER_USER: ${{secrets.DOCKER_USER}}
run: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- name: Build the Docker image
run: docker build . --file Dockerfile --tag $DOCKER_URL_IMAGE_TO_PUSH
- name: Docker Push
run: docker push $DOCKER_URL_IMAGE_TO_PUSH
docker build . --file Dockerfile --tag $DOCKER_URL_IMAGE_TO_PUSH
- name: Docker push
env:
DOCKER_URL_IMAGE_TO_PUSH: ${{secrets.DOCKER_URL_IMAGE_TO_PUSH}}
run: |
docker push $DOCKER_URL_IMAGE_TO_PUSH

0 comments on commit b1ebef0

Please sign in to comment.