From 2e39587d3c7d04ac97aa82c4688f49bffd98c238 Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Thu, 13 Jul 2023 15:08:34 +0200 Subject: [PATCH] Add gitea actions --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ Earthfile | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e893d73 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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: earthly --push +docker-multi diff --git a/Earthfile b/Earthfile index 67bb8c0..0ecdfb5 100644 --- a/Earthfile +++ b/Earthfile @@ -16,4 +16,4 @@ docker: ENTRYPOINT ["node", "lib/index.js"] ARG EARTHLY_TARGET_TAG ARG TAG=$EARTHLY_TARGET_TAG - SAVE IMAGE --push docker.hibas123.de/telegram-rss:$TAG + SAVE IMAGE --push git.hibas.dev/hibas123/telegram-rss:$TAG