diff options
| author | Xe Iaso <me@xeiaso.net> | 2024-12-22 13:36:20 -0500 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2024-12-22 13:36:20 -0500 |
| commit | 2bdb2e095f2f7370c6e287909ecc00dda3779065 (patch) | |
| tree | 2e4c08e628a9d6586406ff78099b193540f57718 /.github | |
| parent | eaf2e57548fb1966be3011eaa257a35b66034c46 (diff) | |
| download | x-2bdb2e095f2f7370c6e287909ecc00dda3779065.tar.xz x-2bdb2e095f2f7370c6e287909ecc00dda3779065.zip | |
autobuild docker images on push to master
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/earthly.yml | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/.github/workflows/earthly.yml b/.github/workflows/earthly.yml new file mode 100644 index 0000000..cca4102 --- /dev/null +++ b/.github/workflows/earthly.yml @@ -0,0 +1,42 @@ +name: Docker image updates + +on: + push: + branches: [ "master" ] + # Publish semver tags as releases. + tags: [ 'v*.*.*' ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: alrest-x + permissions: + contents: read + packages: write + env: + EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }} + 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" + - name: Log into registry + if: github.event_name != 'pull_request' + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - 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
\ No newline at end of file |
