Compare commits

..

4 commits

2 changed files with 20 additions and 46 deletions

View file

@ -1,51 +1,26 @@
name: ci name: ci-workflow
on: push on: [push]
jobs: jobs:
build: ci:
runs-on: ubuntu-22.04 runs-on: docker
steps: steps:
- - name: Checkout
name: Repository meta uses: actions/checkout@v4
id: repository
- name: Debug
run: | run: |
registry=${{ github.server_url }} echo 1 test 2 ${{ secrets.PACKAGES_USER }} 3 ${{ secrets.REPO_USER }} 4
registry=${registry##http*://}
echo "registry=${registry}" >> "$GITHUB_OUTPUT" - name: Build
echo "registry=${registry}" uses: https://codeberg.org/umglurf/kaniko-action@main
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
with: with:
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }} cache: true
- cache_repo: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/fibonacci_go/cache
name: Login to registry credentials: |
uses: docker/login-action@v3 forgejo.edf-bootstrap.cx.fg1.ffm.osc.live=${{ secrets.PACKAGES_USER }}:${{ secrets.PACKAGES_TOKEN }}
with: destinations: |
registry: ${{ steps.repository.outputs.registry }} forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/fibonacci_go:1.2.3
username: ${{ secrets.PACKAGES_USER }} push: 'true'
password: ${{ secrets.PACKAGES_TOKEN }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: '--allow-insecure-entitlement network.host'
driver-opts: network=host
-
name: Build and push
uses: docker/build-push-action@v6
with:
push: true
allow: network.host
network: host
platforms: linux/amd64,linux/arm64
tags: ${{ steps.docker.outputs.tags }}

View file

@ -5,7 +5,6 @@ COPY ./ ./
# RUN go mod download # RUN go mod download
RUN echo jojo
RUN CGO_ENABLED=0 GOOS=linux go build -o fibonacci-go cmd/main.go RUN CGO_ENABLED=0 GOOS=linux go build -o fibonacci-go cmd/main.go
# ToDo: use stretch as image for a completly empty container # ToDo: use stretch as image for a completly empty container