From 62ec5f9314ea0c4b5a1d93d070086bc492901836 Mon Sep 17 00:00:00 2001 From: Kevin Meinhardt Date: Wed, 26 Jun 2024 14:12:27 +0200 Subject: [PATCH] TMP: more --- .github/workflows/build.yml | 59 +++++++++++++++++++++++++++++++++++++ .github/workflows/push.yml | 3 ++ 2 files changed, 62 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..30035a7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,59 @@ +name: Worker (fork) + +on: + workflow_call: + outputs: + image: + description: "The Docker image" + value: '' + version: + description: "The version for the image" + value: '' + digest: + description: "The build digest for the image" + value: '' + tag: + description: "Combines image and version to a valid image tag" + value: '' + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + context: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/context + + login_ghcr: + runs-on: ubuntu-latest + steps: + - name: Login to Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ github.token }} + logout: false + - shell: bash + run: | + docker system info + cat ~/.docker/config.json + + build: + runs-on: ubuntu-latest + needs: [context, login_ghcr] + steps: + - uses: actions/checkout@v4 + - shell: bash + run: | + docker system info + cat ~/.docker/config.json + + + + +# Build and upload image as artifact + diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e69021a..a9f31d4 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -14,6 +14,9 @@ permissions: # 2. add caching based on fork behaviour, use GHA cache or registry.. jobs: + build_call: + uses: ./.github/workflows/build.yml + build: runs-on: ubuntu-latest