.some(bones) #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: cd·docker | |
| on: | |
| push: | |
| paths: | |
| - .github/workflows/cd.docker.yml | |
| - .github/Dockerfile | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| required: true | |
| concurrency: | |
| group: docker/${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/metadata-action@v5 | |
| id: meta | |
| with: | |
| images: | |
| ghcr.io/${{ github.repository_owner }}/bldbot | |
| tags: | | |
| type=sha | |
| - name: Auth with GitHub Container Registry | |
| run: echo "${{ github.token }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - uses: docker/setup-qemu-action@v3 | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: docker/buildx | |
| run: | | |
| for x in $(echo "${{ steps.meta.outputs.tags }}" | tr '\n' ' '); | |
| do tags="$tags --tag $x"; | |
| done | |
| docker buildx build \ | |
| --push \ | |
| $tags \ | |
| --platform linux/amd64,linux/arm64 \ | |
| --file .github/Dockerfile \ | |
| . | |
| - name: push to GHCR | |
| run: | | |
| docker push ghcr.io/${{ github.repository_owner }}/bldbot --all-tags |