diff --git a/.github/workflows/.github-ci.yaml b/.github/workflows/.github-ci.yaml index 7fce44c..bd84037 100644 --- a/.github/workflows/.github-ci.yaml +++ b/.github/workflows/.github-ci.yaml @@ -1,42 +1,26 @@ -name: ci - -on: - push: - workflow_dispatch: +name: ci-workflow + +on: [push] jobs: - build: - runs-on: ubuntu-host + ci: + runs-on: docker steps: - - - name: Repository meta - id: repository + - name: Checkout + uses: actions/checkout@v4 + + - name: Debug run: | - registry=${{ github.server_url }} - registry=${registry##http*://} - echo "registry=${registry}" >> "$GITHUB_OUTPUT" - echo "registry=${registry}" - repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')" - echo "repository=${repository}" >> "$GITHUB_OUTPUT" - echo "repository=${repository}" - - - name: Docker meta - uses: docker/metadata-action@v5 - id: docker + echo 1 test 2 ${{ secrets.PACKAGES_USER }} 3 ${{ secrets.REPO_USER }} 4 + + - name: Build + uses: https://codeberg.org/umglurf/kaniko-action@main with: - images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }} - - - name: Login to registry - uses: docker/login-action@v3 - with: - registry: ${{ steps.repository.outputs.registry }} - username: "${{ secrets.PACKAGES_USER }}" - password: "${{ secrets.PACKAGES_TOKEN }}" - - - name: Build and push - uses: docker/build-push-action@v6 - with: - push: true - platforms: linux/amd64,linux/arm64 - tags: ${{ steps.docker.outputs.tags }} + cache: true + cache_repo: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/fibonacci_go/cache + credentials: | + forgejo.edf-bootstrap.cx.fg1.ffm.osc.live=${{ secrets.PACKAGES_USER }}:${{ secrets.PACKAGES_TOKEN }} + destinations: | + forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/fibonacci_go:1.2.3 + push: 'true' diff --git a/Dockerfile b/Dockerfile index 4280220..45ea65f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,6 @@ COPY ./ ./ # RUN go mod download -RUN echo jojo RUN CGO_ENABLED=0 GOOS=linux go build -o fibonacci-go cmd/main.go # ToDo: use stretch as image for a completly empty container