Add docker workflow #1
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: Push containers to registries | |
| on: | |
| pull_request_target: | |
| types: [closed] | |
| paths: | |
| - 'docker/Dockerfile' | |
| - 'docker/entrypoint.sh' | |
| jobs: | |
| push_docker_containers: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout pull request branch | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@main | |
| - name: Setup up docker buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Log in to ghcr.io with docker | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push docker containers | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker | |
| push: true | |
| tags: | | |
| ghcr.io/${{ github.repository_owner }}/tmate-minimal:latest | |
| outputs: type=image,compression=zstd,push=true |