Compare commits
1 commit
developmen
...
kaniko
Author | SHA1 | Date | |
---|---|---|---|
e86b0ce6f1 |
2 changed files with 18 additions and 33 deletions
48
.github/workflows/.github-ci.yaml
vendored
48
.github/workflows/.github-ci.yaml
vendored
|
@ -3,49 +3,35 @@ name: ci
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
docker:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: docker
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Repository meta
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Repository meta
|
||||||
id: repository
|
id: repository
|
||||||
run: |
|
run: |
|
||||||
registry=${{ github.server_url }}
|
registry=${{ github.server_url }}
|
||||||
registry=${registry##http*://}
|
registry=${registry##http*://}
|
||||||
echo "registry=${registry}" >> "$GITHUB_OUTPUT"
|
echo "registry=${registry}" >> "$GITHUB_OUTPUT"
|
||||||
echo "registry=${registry}"
|
|
||||||
repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
|
repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
|
||||||
echo "repository=${repository}" >> "$GITHUB_OUTPUT"
|
echo "repository=${repository}" >> "$GITHUB_OUTPUT"
|
||||||
echo "repository=${repository}"
|
|
||||||
-
|
- name: Docker meta
|
||||||
name: Docker meta
|
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
id: docker
|
id: docker
|
||||||
with:
|
with:
|
||||||
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
|
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
|
||||||
-
|
|
||||||
name: Login to registry
|
- name: Build and push
|
||||||
uses: docker/login-action@v3
|
uses: https://codeberg.org/umglurf/kaniko-action@main
|
||||||
with:
|
|
||||||
registry: ${{ steps.repository.outputs.registry }}
|
|
||||||
username: ${{ secrets.PACKAGES_USER }}
|
|
||||||
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:
|
with:
|
||||||
|
credentials: |
|
||||||
|
${{ steps.repository.outputs.registry }}=${{ github.repository }}:${{ secrets.PACKAGES_TOKEN }}
|
||||||
|
destinations: |
|
||||||
|
${{ steps.docker.outputs.tags }}
|
||||||
push: true
|
push: true
|
||||||
allow: network.host
|
|
||||||
network: host
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
tags: ${{ steps.docker.outputs.tags }}
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue