From 7153f42affaa542c7f5a54fb253846582865383c Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Wed, 8 Nov 2023 07:50:57 +0100 Subject: [PATCH] use buildah for building --- .gitea/workflows/build-push.yaml | 54 +++++++++++++++++--------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/.gitea/workflows/build-push.yaml b/.gitea/workflows/build-push.yaml index 866fe2b..d7ccc42 100644 --- a/.gitea/workflows/build-push.yaml +++ b/.gitea/workflows/build-push.yaml @@ -1,30 +1,32 @@ -name: ci - -on: - push: - branches: - - 'master' +name: Build and Push Image +on: [ push ] jobs: - docker: + build: + name: Build and push image runs-on: ubuntu-latest + steps: - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Gitea Registry - uses: docker/login-action@v3 - with: - registry: git.tbrnt.ch - username: ${{ secrets.REGISTRY_USERNAME }} - password: ${{ secrets.REGISTRY_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - push: true - tags: git.tbrnt.ch/tobru/ioteer:latest \ No newline at end of file + - uses: actions/checkout@v2 + + - name: Build Image + id: build-image + uses: redhat-actions/buildah-build@v2 + with: + image: ioteer + tags: latest ${{ github.sha }} + containerfiles: | + ./Dockerfile + + - name: Push To git.tbrnt.ch + id: push-to-gitea + uses: redhat-actions/push-to-registry@v2 + with: + image: ${{ steps.build-image.outputs.image }} + tags: ${{ steps.build-image.outputs.tags }} + registry: git.tbrnt.ch/tobru + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Print image url + run: echo "Image pushed to ${{ steps.push-to-gitea.outputs.registry-paths }}" \ No newline at end of file