-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (31 loc) · 1.48 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Release
on:
pull_request_target:
types: [ closed ]
jobs:
release:
name: release after merging ${{ github.head_ref }}
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'renovate/') && endsWith(github.head_ref, '-dind-image')
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
EARTHLY_CONVERSION_PARALLELISM: "5"
EARTHLY_TOKEN: "${{ secrets.EARTHLY_TOKEN }}"
EARTHLY_INSTALL_ID: "earthly-dind-githubactions"
steps:
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.8.9
- uses: actions/checkout@v4
- name: Docker login (non fork only)
run: |-
docker login --username "${{ secrets.DOCKERHUB_USERNAME }}" --password "${{ secrets.DOCKERHUB_TOKEN }}"
docker login registry-1.docker.io.mirror.corp.earthly.dev --username "${{ secrets.DOCKERHUB_MIRROR_USERNAME }}" --password "${{ secrets.DOCKERHUB_MIRROR_PASSWORD }}"
if: github.event.pull_request.head.repo.full_name == github.repository
- name: Configure Earthly to use mirror (non fork only)
run: |-
earthly config global.buildkit_additional_config "'[registry.\"docker.io\"]
mirrors = [\"registry-1.docker.io.mirror.corp.earthly.dev\"]'"
if: github.event.pull_request.head.repo.full_name == github.repository
- name: Build & Push image
run: earthly --ci -P --push --org earthly-technologies --satellite dind +release --RENOVATE_BRANCH=${{github.head_ref}}