Skip to content

Commit f8a5667

Browse files
committed
earthly workflow: try fixing pushing?
Signed-off-by: Xe Iaso <[email protected]>
1 parent b1f18cc commit f8a5667

File tree

1 file changed

+10
-23
lines changed

1 file changed

+10
-23
lines changed

.github/workflows/earthly.yml

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,49 +7,36 @@ on:
77
tags: [ 'v*.*.*' ]
88
pull_request:
99
branches: [ "main" ]
10-
env:
11-
# Use docker.io for Docker Hub if empty
12-
REGISTRY: ghcr.io
13-
# github.repository as <account>/<repo>
14-
IMAGE_NAME: ${{ github.repository }}
1510

1611
jobs:
1712
build:
1813
runs-on: ubuntu-latest
1914
permissions:
2015
contents: read
2116
packages: write
22-
# This is used to complete the identity challenge
23-
# with sigstore/fulcio when running outside of PRs.
24-
id-token: write
25-
2617
steps:
2718
- name: Checkout repository
2819
uses: actions/checkout@v4
2920
- uses: earthly/actions-setup@v1
3021
with:
3122
github-token: ${{ secrets.GITHUB_TOKEN }}
3223
version: "latest" # or pin to an specific version, e.g. "0.8.1"
33-
# Login against a Docker registry except on PR
34-
# https://github.com/docker/login-action
35-
- name: Log into registry ${{ env.REGISTRY }}
24+
- name: Log into registry
3625
if: github.event_name != 'pull_request'
3726
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
3827
with:
39-
registry: ${{ env.REGISTRY }}
28+
registry: ghcr.io
4029
username: ${{ github.actor }}
4130
password: ${{ secrets.GITHUB_TOKEN }}
42-
# Extract metadata (tags, labels) for Docker
43-
# https://github.com/docker/metadata-action
44-
- name: Extract Docker metadata
45-
id: meta
46-
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
47-
with:
48-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
49-
# Build and push Docker image with Buildx (don't push on PR)
50-
# https://github.com/docker/build-push-action
5131
- name: Build and push Docker image
32+
if: github.event_name != 'pull_request'
5233
id: build-and-push
5334
run: |
5435
earthly --push +xesite
55-
earthly --push +patreon-saasproxy
36+
earthly --push +patreon-saasproxy
37+
- name: Build Docker image
38+
if: github.event_name == 'pull_request'
39+
id: build
40+
run: |
41+
earthly +xesite
42+
earthly +patreon-saasproxy

0 commit comments

Comments
 (0)