diff options
| author | Xe Iaso <me@xeiaso.net> | 2024-06-20 23:42:28 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2024-06-20 23:42:28 -0400 |
| commit | 1c243a622be26654027fa4646ab0b27a4ebb00cd (patch) | |
| tree | 3c08632be087945863d8f373993451aa92c24668 /.github/workflows/earthly.yml | |
| parent | 902efdfc306f714bffe2c1a48fbf329cac66489f (diff) | |
| download | xesite-1c243a622be26654027fa4646ab0b27a4ebb00cd.tar.xz xesite-1c243a622be26654027fa4646ab0b27a4ebb00cd.zip | |
attempt to use earthly
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to '.github/workflows/earthly.yml')
| -rw-r--r-- | .github/workflows/earthly.yml | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/.github/workflows/earthly.yml b/.github/workflows/earthly.yml new file mode 100644 index 0000000..a3c276a --- /dev/null +++ b/.github/workflows/earthly.yml @@ -0,0 +1,55 @@ +name: Docker + +on: + push: + branches: [ "main" ] + # Publish semver tags as releases. + tags: [ 'v*.*.*' ] + pull_request: + branches: [ "main" ] +env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as <account>/<repo> + IMAGE_NAME: ${{ github.repository }} + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + # This is used to complete the identity challenge + # with sigstore/fulcio when running outside of PRs. + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - uses: earthly/actions-setup@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + version: "latest" # or pin to an specific version, e.g. "0.8.1" + # Login against a Docker registry except on PR + # https://github.com/docker/login-action + - name: Log into registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + # Extract metadata (tags, labels) for Docker + # https://github.com/docker/metadata-action + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + # Build and push Docker image with Buildx (don't push on PR) + # https://github.com/docker/build-push-action + - name: Build and push Docker image + id: steps.build-and-push + run: | + earthly --push +xesite + earthly --push +patreon-saasproxy
\ No newline at end of file |
