Merge pull request #9 from dockersamples/new-schema-support #19
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*" | |
| jobs: | |
| bake: | |
| name: Build/push images/Compose files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver: cloud | |
| endpoint: ${{ secrets.DOCKER_BUILDER_ENDPOINT }} | |
| - name: Set tag for builds | |
| run: | | |
| if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then | |
| echo "IMAGE_TAG=dev" >> $GITHUB_ENV | |
| else | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| echo "IMAGE_TAG=${TAG}" >> $GITHUB_ENV | |
| fi | |
| - name: Build and push tagged image | |
| uses: docker/bake-action@v6 | |
| with: | |
| push: true |