🔥 Remove the battle arena + more adjustments #149
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: Docker Image CI | |
| on: | |
| push: | |
| branches: ['main'] | |
| # Publish semver tags as releases. | |
| tags: ['v*.*.*'] | |
| paths-ignore: | |
| - '.github/workflows/**' | |
| - 'docs/**' | |
| - 'tests/**' | |
| - 'compose.yaml' | |
| - '*.md' | |
| - 'LICENSE' | |
| pull_request: | |
| branches: ['main'] | |
| paths-ignore: | |
| - '.github/workflows/**' | |
| - 'docs/**' | |
| - 'tests/**' | |
| - 'compose.yaml' | |
| - '*.md' | |
| - 'LICENSE' | |
| merge_group: | |
| env: | |
| REGISTRY: ghcr.io | |
| REPOSITORY: codename-co/devs | |
| IMAGE_NAME: codename/devs | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.IMAGE_NAME }} | |
| flavor: | | |
| latest=true | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}} | |
| type=sha | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} | |
| VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} | |
| REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} | |
| platforms: linux/amd64,linux/arm64 | |
| # - name: Docker Hub Description | |
| # uses: peter-evans/dockerhub-description@v3 | |
| # with: | |
| # username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| # password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| # repository: ${{ env.REPOSITORY }} | |
| # short-description: ${{ github.event.repository.description }} |