diff --git a/.gitea/actions/build/action.yml b/.gitea/actions/build/action.yml new file mode 100644 index 0000000..f8bdcd7 --- /dev/null +++ b/.gitea/actions/build/action.yml @@ -0,0 +1,36 @@ +name: Build docker image +description: 'builds docker image' + +inputs: + tag: + description: 'Docker image tag' + required: true + +outputs: + image_url: + description: 'Full image URL that was built' + value: ${{ steps.build.outputs.image_url }} + +runs: + using: 'composite' + steps: + - name: Set up Docker Build + uses: docker/setup-buildx-action@v3 + + - name: Log in to registry + uses: docker/login-action@v3 + with: + registry: ${{ vars.INSTANCE_URL }} + username: ${{ github.actor }} + password: ${{ secrets.REGISTRY_ACCESS_TOKEN }} + + - name: Build and push image + uses: docker/build-push-action@v6 + with: + push: true + tags: ${{ vars.INSTANCE_URL }}/tech-reborn/phoenix:${{ inputs.tag }} + + - name: Set output + shell: bash + run: | + echo "image_url=${{ vars.INSTANCE_URL }}/tech-reborn/phoenix:${{ inputs.tag }}" >> $GITHUB_OUTPUT diff --git a/.gitea/actions/buildDockerImage.yml b/.gitea/actions/buildDockerImage.yml deleted file mode 100644 index f7d2b64..0000000 --- a/.gitea/actions/buildDockerImage.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Build docker image -inputs: - tag: - description: 'Docker image tag' - required: true - -outputs: - image_url: - description: 'Full image URL that was built' - value: ${{ steps.build.outputs.image_url }} - -jobs: - build_docker: - runs-on: ubuntu-latest - steps: - - name: Set up Docker Build - uses: docker/setup-buildx-action@v3 - - - name: Log in to registry - uses: docker/login-action@v3 - with: - registry: ${{ vars.INSTANCE_URL }} - username: ${{ github.actor }} - password: ${{ secrets.REGISTRY_ACCESS_TOKEN }} - - - name: Build and push image - uses: docker/build-push-action@v6 - with: - push: true - tags: ${{ vars.INSTANCE_URL }}/tech-reborn/phoenix:${{ inputs.tag }} - - - name: Set output - shell: bash - run: | - echo "image_url=${{ vars.INSTANCE_URL }}/tech-reborn/phoenix:${{ inputs.tag }}" >> $GITHUB_OUTPUT diff --git a/.gitea/actions/deploy.yml b/.gitea/actions/deploy/action.yml similarity index 100% rename from .gitea/actions/deploy.yml rename to .gitea/actions/deploy/action.yml