debug test connect #39
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: image | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - v[0-9]+.[0-9]+.x | |
| tags: | |
| - v* | |
| workflow_dispatch: | |
| jobs: | |
| image: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup Qemu | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Setup Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login Docker | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Load Image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| load: true | |
| tags: ${{ github.repository }}:test | |
| - name: Test Image | |
| run: | | |
| docker run --rm ${{ github.repository }}:test basjoofan eval 'println("🍀 Hello Basjoofan!");' | |
| - name: Echo Tag | |
| run: | | |
| tag=${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || github.sha }} | |
| ${{ startsWith(github.ref, 'refs/tags/') }} && echo tag=${tag#v} >> $GITHUB_ENV || echo tag=${tag} >> $GITHUB_ENV | |
| - name: Build Image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| tags: | | |
| ${{ github.repository }}:latest | |
| ${{ github.repository }}:${{ env.tag }} |