Make available tags its own subheading #7
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: Build and Push Container Images | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| IMAGE_TAG: |- | |
| ${{ | |
| github.ref_name == 'main' && 'latest' | |
| || github.ref_name == 'dev' && 'experimental' | |
| || 'unknown' | |
| }} | |
| steps: | |
| - name: Checkout code | |
| 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: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push image | |
| run: | | |
| IMAGE=ghcr.io/${{ github.repository_owner }}/astroneer-server | |
| docker buildx build \ | |
| --platform linux/amd64,linux/arm64 \ | |
| -t $IMAGE:$IMAGE_TAG \ | |
| --push . |