From 4713dce540c75efa20b4357def5977a6f31b88e4 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Mon, 7 Aug 2023 11:34:31 +0200 Subject: [PATCH] pipeline runner --- .gitea/workflows/container-build.yaml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/container-build.yaml b/.gitea/workflows/container-build.yaml index 3fdb279..f422079 100644 --- a/.gitea/workflows/container-build.yaml +++ b/.gitea/workflows/container-build.yaml @@ -3,31 +3,26 @@ on: release: types: [published] push: - workflow_dispatch: jobs: build: container: - image: ghcr.io/catthehacker/ubuntu:custom-20.04 + image: git.halis.io/athens-school/runner-images:debian12.1-node18 runs-on: [arm64] steps: - name: Make tag id: tag_vars run: echo "IMAGE_NAME=$(echo $GITHUB_SERVER_URL/$GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]' | cut -d '/' -f3-)" >> $GITHUB_OUTPUT - #- name: Docker login - # run: docker login ${{ GITHUB_SERVER_URL }} -u ${{ GITHUB_REPOSITORY_OWNER }} --password not-a-password - name: Login to register uses: https://gitea.com/docker/login-action@v2 with: registry: git.halis.io username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Docker pull - run: docker pull ubuntu:latest - - name: Var envs - run: export - - name: Docker retag - run: docker tag ubuntu:latest ${{ steps.tag_vars.outputs.IMAGE_NAME }}:latest - - name: Docker push - run: docker push ${{ steps.tag_vars.outputs.IMAGE_NAME }}:latest + password: ${{ secrets.CONTAINER_TOKEN }} + - name: Build and push + uses: https://github.com/docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ IMAGE_NAME }}:latest