From db94221888b409bb4f12db3434dc1cc051e9ccfa Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Sun, 10 Mar 2024 01:45:04 +0100 Subject: [PATCH] Esclusi file da build, attivato workflow di rilascio del container. --- .dockerignore | 2 ++ .gitea/workflows/default.yaml | 44 +++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .dockerignore create mode 100644 .gitea/workflows/default.yaml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..318918e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.gitea/* +README.md diff --git a/.gitea/workflows/default.yaml b/.gitea/workflows/default.yaml new file mode 100644 index 0000000..acb06b7 --- /dev/null +++ b/.gitea/workflows/default.yaml @@ -0,0 +1,44 @@ +--- +name: Build Image +on: [ push ] + +jobs: + BuildImage: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + env: + DOCKER_ORG: ${{ secrets.SYS42_REGISTRY_ORG }} + DOCKER_USERNAME: ${{ secrets.SYS42_REGISTRY_USERNAME }} + DOCKER_IMAGE_NAME: myarch + DOCKER_VERSION: latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v2 + with: + config-inline: | + [registry."${{ secrets.SYS42_REGISTRY_ORG }}"] + http = false + insecure = false + + - name: Login to Registry + uses: docker/login-action@v2 + with: + registry: ${{ secrets.SYS42_REGISTRY_ORG }} + username: ${{ secrets.SYS42_REGISTRY_USERNAME }} + password: ${{ secrets.SYS42_REGISTRY_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + file: ./Dockerfile + push: true + tags: ${{ env.DOCKER_ORG }}/${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE_NAME }}:${{ env.DOCKER_VERSION }}