pipeline test
This commit is contained in:
parent
6306d518b0
commit
cb12284f6b
3 changed files with 98 additions and 2 deletions
96
.github/workflows/build.yml
vendored
Normal file
96
.github/workflows/build.yml
vendored
Normal file
|
|
@ -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 }}
|
||||||
|
|
@ -28,7 +28,7 @@ PERM=$(stat -c '%U' /home/${USERNAME}/.config)
|
||||||
|
|
||||||
# set random password for abc user to prevent it from connecting
|
# set random password for abc user to prevent it from connecting
|
||||||
|
|
||||||
$RANDOM_PASS=`tr -dc A-Za-z0-9 </dev/urandom | head -c 13 ; echo ''`
|
RANDOM_PASS=`tr -dc A-Za-z0-9 </dev/urandom | head -c 13 ; echo ''`
|
||||||
|
|
||||||
echo abc:${RANDOM_PASS} | chpasswd
|
echo abc:${RANDOM_PASS} | chpasswd
|
||||||
usermod -s /bin/false abc
|
usermod -s /bin/false abc
|
||||||
|
|
@ -28,7 +28,7 @@ PERM=$(stat -c '%U' /home/${USERNAME}/.config)
|
||||||
|
|
||||||
# set random password for abc user to prevent it from connecting
|
# set random password for abc user to prevent it from connecting
|
||||||
|
|
||||||
$RANDOM_PASS=`tr -dc A-Za-z0-9 </dev/urandom | head -c 13 ; echo ''`
|
RANDOM_PASS=`tr -dc A-Za-z0-9 </dev/urandom | head -c 13 ; echo ''`
|
||||||
|
|
||||||
echo abc:${RANDOM_PASS} | chpasswd
|
echo abc:${RANDOM_PASS} | chpasswd
|
||||||
usermod -s /bin/false abc
|
usermod -s /bin/false abc
|
||||||
Loading…
Add table
Add a link
Reference in a new issue