Skip to content

Commit

Permalink
Keep testing image local
Browse files Browse the repository at this point in the history
  • Loading branch information
kadykov committed Nov 20, 2024
1 parent 05e7aaa commit dc041f9
Showing 1 changed file with 28 additions and 32 deletions.
60 changes: 28 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,6 @@ jobs:
- uses: pre-commit-ci/[email protected]
if: always()

docker:
name: Build and push testing Docker image
needs: pre_commit
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ env.IMAGE_TAG_TESTING }}
cache-from: type=registry,ref=${{ env.IMAGE_TAG_TESTING }}
cache-to: type=inline

source:
name: Extract example source files
needs: pre_commit
Expand All @@ -67,13 +45,28 @@ jobs:
./justfile
if-no-files-found: error

render:
name: Render default files and update Docker tags
needs:
- docker
- source
docker:
name: Build and push testing Docker image
needs: source
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and export to Docker
uses: docker/build-push-action@v6
with:
load: true
tags: ${{ env.IMAGE_TAG_TESTING }}
cache-from: type=registry,ref=${{ env.IMAGE_TAG }}
cache-to: type=inline

- name: Download source files
uses: actions/download-artifact@v4
with:
Expand All @@ -99,14 +92,17 @@ jobs:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Update Docker tag
run: |
docker image tag ${{ env.IMAGE_TAG_TESTING }} ${{ env.IMAGE_TAG }}
docker image push ${{ env.IMAGE_TAG }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ env.IMAGE_TAG }}
cache-from: type=registry,ref=${{ env.IMAGE_TAG }}
cache-to: type=inline

publish:
name: Publish to GitHub pages
needs: render
needs: docker
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down

0 comments on commit dc041f9

Please sign in to comment.