aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2024-06-21 09:00:46 -0400
committerXe Iaso <me@xeiaso.net>2024-06-21 09:00:46 -0400
commitf8a5667ec415cd26a46419f21da786d36af84611 (patch)
treee11c62568b055b70fb23f444265c80ca5900d7b2 /.github
parentb1f18cc222ed54c90f8afa5d30c2b569bb7f35ea (diff)
downloadxesite-f8a5667ec415cd26a46419f21da786d36af84611.tar.xz
xesite-f8a5667ec415cd26a46419f21da786d36af84611.zip
earthly workflow: try fixing pushing?
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/earthly.yml33
1 files changed, 10 insertions, 23 deletions
diff --git a/.github/workflows/earthly.yml b/.github/workflows/earthly.yml
index 1638cdf..7ae5381 100644
--- a/.github/workflows/earthly.yml
+++ b/.github/workflows/earthly.yml
@@ -7,11 +7,6 @@ on:
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:
@@ -19,10 +14,6 @@ jobs:
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
@@ -30,26 +21,22 @@ jobs:
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 }}
+ - name: Log into registry
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
- registry: ${{ env.REGISTRY }}
+ registry: ghcr.io
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
+ if: github.event_name != 'pull_request'
id: build-and-push
run: |
earthly --push +xesite
- earthly --push +patreon-saasproxy \ No newline at end of file
+ earthly --push +patreon-saasproxy
+ - name: Build Docker image
+ if: github.event_name == 'pull_request'
+ id: build
+ run: |
+ earthly +xesite
+ earthly +patreon-saasproxy \ No newline at end of file