From 7d9ca9b7e72b85576d1324835641c92e7511310c Mon Sep 17 00:00:00 2001 From: Tom Dohrmann Date: Thu, 24 Oct 2024 15:35:51 +0200 Subject: [PATCH] workflows: add workflow to push cleanup image --- .github/workflows/cleanup.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/cleanup.yml diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml new file mode 100644 index 0000000000..0496012d21 --- /dev/null +++ b/.github/workflows/cleanup.yml @@ -0,0 +1,40 @@ +name: push cleanup-bm image + +on: + pull_request: + paths: + - .github/workflows/cleaup.yml + - packages/** + +env: + container_registry: ghcr.io/edgelesssys + +jobs: + push: + name: "push cleanup image" + runs-on: ubuntu-22.04 + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - if: ${{ !inputs.self-hosted }} + uses: ./.github/actions/setup_nix + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + cachixToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + - name: Log in to ghcr.io Container registry + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: nicknovitski/nix-develop@a2060d116a50b36dfab02280af558e73ab52427d # v1.1.0 + - name: Create justfile.env + run: | + cat < justfile.env + container_registry=${{ env.container_registry }} + EOF + - name: Build and push just push cleanup-bm image + run: | + just push cleanup-bm