docs: update CONTRIBUTING_DOCKER.md to reflect dev branch CI/CD builds #2
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: Build and push Docker images | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| - beta | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Resolve build metadata | |
| id: meta | |
| run: | | |
| if [[ "$GITHUB_REF" == refs/tags/* ]]; then | |
| echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT | |
| echo "additional_tag=latest" >> $GITHUB_OUTPUT | |
| elif [[ "$GITHUB_REF_NAME" == "beta" ]]; then | |
| echo "version=beta" >> $GITHUB_OUTPUT | |
| echo "additional_tag=" >> $GITHUB_OUTPUT | |
| else | |
| echo "version=dev" >> $GITHUB_OUTPUT | |
| echo "additional_tag=" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
| password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
| - name: Build and push | |
| run: docker buildx bake all --push | |
| env: | |
| BUGHOG_VERSION: ${{ steps.meta.outputs.version }} | |
| ADDITIONAL_TAG: ${{ steps.meta.outputs.additional_tag }} |