diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 0f97341..6026c6f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -14,22 +14,12 @@ jobs: - name: Inject slug/short variables uses: rlespinasse/github-slug-action@v4 - - name: Get GitHub downloader - run: wget https://gist.github.com/mrsarm/95279381f3d8bf4269499fb437888e2c/raw/github-file.sh - - name: Get compose.yaml - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: bash ./github-file.sh compose.yaml mrsarm/dcoleman-e2e $GITHUB_REF_SLUG main $GITHUB_TOKEN - - name: Get .env.example - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: bash ./github-file.sh .env.example mrsarm/dcoleman-e2e $GITHUB_REF_SLUG main $GITHUB_TOKEN - - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build the Docker image run: ./docker-build.sh "${GITHUB_REF_SLUG}" - name: Run tests @@ -38,6 +28,17 @@ jobs: if: ${{ github.ref != 'refs/heads/master' }} run: docker push "mrsarm/django-coleman:${GITHUB_REF_SLUG}" + - name: Get GitHub downloader + run: wget https://gist.github.com/mrsarm/95279381f3d8bf4269499fb437888e2c/raw/github-file.sh + - name: Get compose.yaml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: bash ./github-file.sh compose.yaml mrsarm/dcoleman-e2e $GITHUB_REF_SLUG main $GITHUB_TOKEN + - name: Get .env.example + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: bash ./github-file.sh .env.example mrsarm/dcoleman-e2e $GITHUB_REF_SLUG main $GITHUB_TOKEN + - name: Setup environment variables run: cp .env.example .env - name: Download pose