name: Docker image updates on: push: branches: ["xmaster"] # Publish semver tags as releases. tags: ["xv*.*.*"] pull_request: branches: ["xmaster"] jobs: docker-build: runs-on: alrest-x permissions: contents: read packages: write env: EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }} steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 fetch-tags: true - uses: earthly/actions-setup@v1 with: github-token: ${{ secrets.GITHUB_TOKEN }} version: "latest" # or pin to an specific version, e.g. "0.8.1" - name: Log into registry if: github.event_name != 'pull_request' uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: ghcr.io username: xe password: ${{ secrets.GHCR_PUSH }} - name: Build and push Docker image if: github.event_name != 'pull_request' id: build-and-push run: | earthly --org me-2625 --sat alpha --ci --push +all - name: Build Docker image if: github.event_name == 'pull_request' id: build run: | earthly --org me-2625 --sat alpha --ci +all