[pre-commit.ci] auto fixes from pre-commit.com hooks #115
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: "⚒️ Docker" | |
| on: | |
| push: | |
| release: | |
| types: | |
| - published | |
| workflow_dispatch: | |
| jobs: | |
| push-store-image: | |
| name: "🏗️ Build & Push" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: Checkout GitHub Action | |
| uses: actions/checkout@main | |
| - name: Generate Docker Metadata | |
| id: docker_metadata | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| name=gounux/gischat,enable=${{ github.event_name == 'release' }} | |
| name=ghcr.io/geotribu/gischat,enable=true | |
| flavor: latest=auto | |
| tags: type=semver,pattern={{version}} | |
| - name: Login to Docker Hub | |
| if: ${{ github.event_name == 'release' }} | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ vars.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GHCR_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: ${{ github.event_name == 'release' }} | |
| tags: ${{ steps.docker_metadata.outputs.tags }} | |
| cache-from: type=registry,ref=ghcr.io/geotribu/gischat:buildcache | |
| cache-to: type=registry,ref=ghcr.io/geotribu/gischat:buildcache,mode=max |