parent
310c8e12fa
commit
675a73e551
36
.github/workflows/ci.yml
vendored
Normal file
36
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# .github/workflows/ci.yml
|
||||||
|
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
MY_DOCKER_USERNAME: ${{ secrets.MY_DOCKER_USERNAME }}
|
||||||
|
MY_DOCKER_PASSWORD: ${{ secrets.MY_DOCKER_PASSWORD }}
|
||||||
|
FORCE_COLOR: 1
|
||||||
|
steps:
|
||||||
|
- uses: https://github.com/earthly/actions-setup@v1
|
||||||
|
with:
|
||||||
|
version: v0.7.0
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Put back the git branch into git (Earthly uses it for tagging)
|
||||||
|
run: |
|
||||||
|
branch=""
|
||||||
|
if [ -n "$GITHUB_HEAD_REF" ]; then
|
||||||
|
branch="$GITHUB_HEAD_REF"
|
||||||
|
else
|
||||||
|
branch="${GITHUB_REF##*/}"
|
||||||
|
fi
|
||||||
|
git checkout -b "$branch" || true
|
||||||
|
- name: Docker Login
|
||||||
|
run: docker login git.hibas.dev --username "$MY_DOCKER_USERNAME" --password "$MY_DOCKER_PASSWORD"
|
||||||
|
- name: Earthly version
|
||||||
|
run: earthly --version
|
||||||
|
- name: Run build
|
||||||
|
run: cd registry && earthly --push +docker-multi
|
Loading…
Reference in New Issue
Block a user