From cb12284f6b72c713de0aad99f83b241dfdaad334 Mon Sep 17 00:00:00 2001 From: Michael Trip Date: Thu, 19 Jan 2023 20:47:29 +0100 Subject: [PATCH] pipeline test --- .github/workflows/build.yml | 96 ++++++++++++++++++++++++ mate/root/etc/cont-init.d/60-create-user | 2 +- xfce/root/etc/cont-init.d/60-create-user | 2 +- 3 files changed, 98 insertions(+), 2 deletions(-) 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..69e0c6f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,96 @@ +name: Build + +on: + push: + branches: + - main + + pull_request: + branches: + - main + + # schedule: + # # * is a special character in YAML so you have to quote this string + # - cron: '0 7 * * 1' + +jobs: + build_mate: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Check Out Repo + uses: actions/checkout@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Set build timestamp + run: echo "timestamp=$(date +%Y%m%d)" >> $GITHUB_ENV + + - name: Set build_date + run: echo "build_date=$(date +%Y%m%d)" >> $GITHUB_ENV + + - name: Set version + run: echo "version=1.0" >> $GITHUB_ENV + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + context: ./mate + file: ./mate/Dockerfile + push: true + tags: michaeltrip/containerdesk:mate, michaeltrip/containerdesk:mate-${{ env.timestamp }} + platforms: linux/arm64,linux/amd64 + + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} + + build_xfce: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Check Out Repo + uses: actions/checkout@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Set build timestamp + run: echo "timestamp=$(date +%Y%m%d)" >> $GITHUB_ENV + + - name: Set build_date + run: echo "build_date=$(date +%Y%m%d)" >> $GITHUB_ENV + + - name: Set version + run: echo "version=1.0" >> $GITHUB_ENV + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + context: ./xfce + file: ./xfce/Dockerfile + push: true + tags: michaeltrip/containerdesk:xfce, michaeltrip/containerdesk:xfce-${{ env.timestamp }} + platforms: linux/arm64,linux/amd64 + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/mate/root/etc/cont-init.d/60-create-user b/mate/root/etc/cont-init.d/60-create-user index ec2e6e3..91004d5 100644 --- a/mate/root/etc/cont-init.d/60-create-user +++ b/mate/root/etc/cont-init.d/60-create-user @@ -28,7 +28,7 @@ PERM=$(stat -c '%U' /home/${USERNAME}/.config) # set random password for abc user to prevent it from connecting -$RANDOM_PASS=`tr -dc A-Za-z0-9