Bump utils/yip to 1.0.0 #5680
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
concurrency: | |
group: ci-${{ github.head_ref || github.ref }}-${{ github.repository }} | |
cancel-in-progress: true | |
jobs: | |
generate-matrix: | |
name: Generate matrix for build | |
runs-on: ubuntu-latest | |
env: | |
LUET_VERSION: 0.18.1 | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install deps | |
run: | | |
curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh | |
sudo luet install -y repository/mocaccino-extra | |
sudo luet install -y utils/jq | |
- name: Set matrix for build | |
id: set-matrix | |
run: | | |
JSON="{\"include\":" | |
JSONline="$(luet tree pkglist --tree packages -o json | jq -rc '.packages')" | |
JSON="$JSON$JSONline" | |
JSON="$JSON}" | |
# Set output | |
echo "::set-output name=matrix::$( echo "$JSON" )" | |
build: | |
needs: generate-matrix | |
strategy: | |
fail-fast: false | |
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}} | |
env: | |
LUET_VERSION: 0.18.1 | |
ARCH: amd64 | |
# CONFIGURE: FINAL_REPO is the container image which will be used | |
# to push packages to. | |
#FINAL_REPO: quay.io/mocaccino/mocaccino-community | |
FINAL_REPO: quay.io/mocaccino/extra | |
CURRENT_PACKAGE: ${{ matrix.category }}/${{ matrix.name }}@${{ matrix.version }} | |
# Repository used to pull images from. needed if you list any repo in .luet.yaml | |
#PULL_REPOSITORY: quay.io/mocaccinocache/desktop | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Release space from worker | |
run: | | |
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android | |
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET | |
- run: | | |
git fetch --prune --unshallow | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@master | |
with: | |
platforms: all | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@master | |
# CONFIGURE: we might use quay here in our example, adapt as needed | |
- name: Login to Quay Registry | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
run: echo ${{ secrets.QUAY_ROBOT_PASSWORD }} | docker login -u ${{ secrets.QUAY_ROBOT_USERNAME }} --password-stdin quay.io | |
# - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
# name: Login to GitHub Container Registry | |
# uses: docker/login-action@v1 | |
# with: | |
# registry: ghcr.io | |
# username: ${{ github.repository_owner }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install deps π§ | |
run: | | |
curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh | |
docker buildx | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.16' | |
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
name: "Push cache" | |
run: echo "PUSH_CACHE=true" >> $GITHUB_ENV | |
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
name: "Enable Buildx" | |
run: echo "BUILDX=true" >> $GITHUB_ENV | |
- name: Build packages π§ | |
run: | | |
docker buildx install | |
export PATH=$PATH:/usr/local/go/bin | |
mkdir build || true | |
pushd ./.github | |
go build -o build | |
popd | |
sudo -E ./.github/build | |
ls -liah $PWD/build | |
sudo chmod -R 777 $PWD/build | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.category }}-${{ matrix.name }}-${{ matrix.version }}.zip | |
path: | | |
build/ | |
create-repo: | |
needs: build | |
env: | |
LUET_VERSION: 0.18.1 | |
FINAL_REPO: quay.io/mocaccino/extra | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
git fetch --prune --unshallow | |
- name: Login to Quay Registry | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
run: echo ${{ secrets.QUAY_ROBOT_PASSWORD }} | docker login -u ${{ secrets.QUAY_ROBOT_USERNAME }} --password-stdin quay.io | |
# - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
# name: Login to GitHub Container Registry | |
# uses: docker/login-action@v1 | |
# with: | |
# registry: ghcr.io | |
# username: ${{ github.repository_owner }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install deps π§ | |
run: | | |
curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.16' | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v2 | |
- name: Merge artifacts π§ | |
run: | | |
mkdir build || true | |
for i in $(ls | grep zip); do | |
cp -rfv $i/* build | |
done | |
ls -liah | |
ls -liah build | |
- name: Fetch metadata of packages π§ | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
run: | | |
ls -liah | |
export PATH=$PATH:/usr/local/go/bin | |
pushd ./.github | |
go build -o build | |
popd | |
sudo -E ./.github/build | |
ls -liah $PWD/build | |
sudo chmod -R 777 $PWD/build | |
- name: Create repo π§ | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
run: | | |
FINAL_REPO=$(echo "$FINAL_REPO" | tr '[:upper:]' '[:lower:]') | |
sudo -E luet create-repo \ | |
--push-images \ | |
--type docker \ | |
--output $FINAL_REPO \ | |
--name "mocaccino-extra" \ | |
--packages ${PWD}/build \ | |
--tree ${PWD}/packages | |
# - name: Deploy GH Pages π | |
# if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
# uses: JamesIves/[email protected] | |
# with: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# BRANCH: gh-pages # The branch the action should deploy to. | |
# FOLDER: build # The folder the action should deploy. | |
# CLEAN: true # Automatically remove deleted files from the deploy branch | |
# SINGLE_COMMIT: true | |
build-arm: | |
needs: [ generate-matrix, create-repo ] | |
strategy: | |
fail-fast: false | |
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}} | |
env: | |
LUET_VERSION: 0.18.1 | |
ARCH: arm/v7 | |
# CONFIGURE: FINAL_REPO is the container image which will be used | |
# to push packages to. | |
#FINAL_REPO: quay.io/mocaccino/mocaccino-community | |
FINAL_REPO: quay.io/mocaccino/extra-arm | |
CURRENT_PACKAGE: ${{ matrix.category }}/${{ matrix.name }}@${{ matrix.version }} | |
# Repository used to pull images from. needed if you list any repo in .luet.yaml | |
#PULL_REPOSITORY: quay.io/mocaccinocache/desktop | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Release space from worker | |
run: | | |
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android | |
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET | |
- run: | | |
git fetch --prune --unshallow | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@master | |
with: | |
platforms: all | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@master | |
# CONFIGURE: we might use quay here in our example, adapt as needed | |
- name: Login to Quay Registry | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
run: echo ${{ secrets.QUAY_ROBOT_PASSWORD }} | docker login -u ${{ secrets.QUAY_ROBOT_USERNAME }} --password-stdin quay.io | |
# - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
# name: Login to GitHub Container Registry | |
# uses: docker/login-action@v1 | |
# with: | |
# registry: ghcr.io | |
# username: ${{ github.repository_owner }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install deps π§ | |
run: | | |
curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.16' | |
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
name: "Push cache" | |
run: echo "PUSH_CACHE=true" >> $GITHUB_ENV | |
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
name: "Enable Buildx" | |
run: echo "BUILDX=true" >> $GITHUB_ENV | |
- name: Build packages π§ | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
run: | | |
docker buildx install | |
export PATH=$PATH:/usr/local/go/bin | |
mkdir build || true | |
pushd ./.github | |
go build -o build | |
popd | |
sudo -E ./.github/build | |
ls -liah $PWD/build | |
sudo chmod -R 777 $PWD/build | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: arm-${{ matrix.category }}-${{ matrix.name }}-${{ matrix.version }}.zip | |
path: | | |
build/ | |
create-repo-arm: | |
needs: build-arm | |
env: | |
LUET_VERSION: 0.18.1 | |
FINAL_REPO: quay.io/mocaccino/extra-arm | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
git fetch --prune --unshallow | |
- name: Login to Quay Registry | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
run: echo ${{ secrets.QUAY_ROBOT_PASSWORD }} | docker login -u ${{ secrets.QUAY_ROBOT_USERNAME }} --password-stdin quay.io | |
# - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
# name: Login to GitHub Container Registry | |
# uses: docker/login-action@v1 | |
# with: | |
# registry: ghcr.io | |
# username: ${{ github.repository_owner }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install deps π§ | |
run: | | |
curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.16' | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v2 | |
- name: Merge artifacts π§ | |
run: | | |
mkdir build || true | |
for i in $(ls | grep zip | grep arm); do | |
cp -rfv $i/* build | |
done | |
ls -liah | |
ls -liah build | |
- name: Fetch metadata of packages π§ | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
run: | | |
ls -liah | |
export PATH=$PATH:/usr/local/go/bin | |
pushd ./.github | |
go build -o build | |
popd | |
sudo -E ./.github/build | |
ls -liah $PWD/build | |
sudo chmod -R 777 $PWD/build | |
- name: Create repo π§ | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
run: | | |
FINAL_REPO=$(echo "$FINAL_REPO" | tr '[:upper:]' '[:lower:]') | |
sudo -E luet create-repo \ | |
--push-images \ | |
--type docker \ | |
--output $FINAL_REPO \ | |
--name "mocaccino-extra" \ | |
--packages ${PWD}/build \ | |
--tree ${PWD}/packages |