diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21ae1d5a..e41d95b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,8 @@ permissions: contents: read jobs: - setup: - name: Setup Environment + build_and_publish: + name: Build and publish artifacts runs-on: ubuntu-latest steps: - name: Sync repository @@ -55,12 +55,9 @@ jobs: echo "extra-substituters = ${{ env.ATTIC_ENDPOINT }}" >> /etc/nix/nix.conf echo "extra-trusted-public-keys = ${{ env.ATTIC_PUBLIC_KEY }}" >> /etc/nix/nix.conf - - name: Populate `/nix/store` and package environment + - name: Populate `/nix/store` and activate `direnv` run: | nix develop --command true - - - name: Install and activate `direnv` - run: | nix-env -f "" -iA direnv -iA nix-direnv touch $HOME/.direnvrc source $HOME/.direnvrc @@ -140,22 +137,17 @@ jobs: path: target/aarch64-unknown-linux-musl-jemalloc.deb if-no-files-found: error - - name: Build OCI images + - name: Build OCI image targets run: | /bin/nix-build-and-cache .#oci-image-x86_64-unknown-linux-musl .#oci-image-x86_64-unknown-linux-musl-jemalloc .#oci-image-aarch64-unknown-linux-musl .#oci-image-aarch64-unknown-linux-musl-jemalloc - - name: Organise OCI outputs + - name: Organise OCI image outputs run: | mv result oci-image-x86_64-unknown-linux-musl.tar.gz mv result-1 oci-image-x86_64-unknown-linux-musl-jemalloc.tar.gz mv result-2 oci-image-aarch64-unknown-linux-musl.tar.gz mv result-3 oci-image-aarch64-unknown-linux-musl-jemalloc.tar.gz - - name: Build OCI for ${{ matrix.target }} - run: | - ./bin/nix-build-and-cache .#oci-image-${{ matrix.target }} - cp -v -f result oci-image-${{ matrix.target }}.tar.gz - - name: Upload OCI image x86_64-unknown-linux-musl uses: actions/upload-artifact@v4 with: @@ -202,7 +194,7 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Create and push Manifest to GitHub + - name: Create and push combined manifest to GitHub run: | REPO_GHCR="ghcr.io/${{ github.repository }}" SHA_TAG="${{ github.ref_name }}-${{ github.sha }}" @@ -231,7 +223,7 @@ jobs: username: ${{ env.DOCKER_USERNAME }} password: ${{ env.DOCKERHUB_TOKEN }} - - name: Create and push manifest to Docker Hub + - name: Create and push combined manifest to Docker Hub env: DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }}