From 565de48636f5b454fcc34d2f93a807e87861b216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Wed, 6 Dec 2023 03:54:46 +0100 Subject: [PATCH] Add release-nightly workflow --- .gitea/workflows/release-nightly.yml | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .gitea/workflows/release-nightly.yml diff --git a/.gitea/workflows/release-nightly.yml b/.gitea/workflows/release-nightly.yml new file mode 100644 index 0000000..8be7f29 --- /dev/null +++ b/.gitea/workflows/release-nightly.yml @@ -0,0 +1,51 @@ +name: release-nightly + +on: + push: + branches: [ main ] + +env: + REGISTRY: git.t-juice.club + IMAGE_NAME: ${{ gitea.repository }} + +jobs: + release-image: + runs-on: ubuntu-latest + env: + DOCKER_ORG: torjus + DOCKER_TAG: nightly + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 # all history for all branches and tags + submodules: true + ssh-known-hosts: "{{ secret.SSH_KNOWN_HOSTS }}" + ssh-key: "{{ secret.SSH_KEY }}" + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v3 + + - name: Login to git.t-juice.club registry + uses: docker/login-action@v3 + with: + registry: git.t-juice.club + username: ${{ gitea.actor }} + password: ${{ secrets.GITHUB_TOOKEN }} + + - name: Get Meta + id: meta + run: | + echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT + echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + platforms: | + linux/amd64 + push: true + tags: | + ${{ env.REGISTRY }}/{{ env.DOCKER_ORG }}/{{ gitea.repository }}:{{ env.DOCKER_TAG }}