Merge branch '3.1' of github.com:abcdesktopio/oc.user into 3.1 #356
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 and test oc.user images linux/amd64, linux/arm64 | |
on: | |
push: | |
env: | |
imagetag: ${{ github.head_ref || github.ref_name || 'dev' }} | |
jobs: | |
build_matrix: | |
strategy: | |
matrix: | |
target_mode: [default, hardening] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref_name }} | |
submodules: true | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: "image tag" | |
run: echo "image tag set to ${{ matrix.target_mode }}" | |
- name: Run Buildx oc.user | |
run: | | |
./mkversion.sh ${{ matrix.target_mode }} | |
- name: Build test image abcdesktopio/oc.user:test | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile.ubuntu | |
platforms: linux/amd64, linux/arm64 | |
push: true | |
build-args: | | |
TARGET_MODE=${{ matrix.target_mode }} | |
ABCDESKTOP_LOCALACCOUNT_DIR=/etc/localaccount | |
TAG=22.04 | |
BASE_IMAGE_RELEASE=22.04 | |
BASE_IMAGE=ubuntu | |
tags: abcdesktopio/oc.user.${{ matrix.target_mode }}:test.3.1 | |
- name: Run and test docker image abcdesktopio/oc.user.${{ matrix.target_mode }}:test.3.1 | |
run: | | |
TARGET_MODE=${{ matrix.target_mode }} ./make-test.sh abcdesktopio/oc.user.${{ matrix.target_mode }}:test.3.1 | |
- name: Build and push image oc.user.${{ matrix.target_mode }}:3.0 | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile.ubuntu | |
platforms: linux/amd64, linux/arm64 | |
push: true | |
build-args: | | |
TARGET_MODE=${{ matrix.target_mode }} | |
ABCDESKTOP_LOCALACCOUNT_DIR=/var/secrets/abcdesktop/localaccount | |
TAG=22.04 | |
BASE_IMAGE_RELEASE=22.04 | |
BASE_IMAGE=ubuntu | |
tags: abcdesktopio/oc.user.${{ matrix.target_mode }}:3.0 | |
- name: Build and push image oc.user.${{ matrix.target_mode }}:3.1 | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile.ubuntu | |
platforms: linux/amd64, linux/arm64 | |
push: true | |
build-args: | | |
TARGET_MODE=${{ matrix.target_mode }} | |
ABCDESKTOP_LOCALACCOUNT_DIR=/etc/localaccount | |
TAG=22.04 | |
BASE_IMAGE_RELEASE=22.04 | |
BASE_IMAGE=ubuntu | |
tags: abcdesktopio/oc.user.${{ matrix.target_mode }}:3.1 | |
# - name: Run Trivy vulnerability scanner | |
# uses: aquasecurity/trivy-action@master | |
# with: | |
# image-ref: abcdesktopio/oc.user.ubuntu:${{ env.imagetag }} | |
# format: 'sarif' | |
# output: oc.user.ubuntu.sarif | |
# - name: Upload Trivy scan results to GitHub Security tab | |
# uses: github/codeql-action/upload-sarif@v2 | |
# if: always() | |
# with: | |
# sarif_file: oc.user.ubuntu.sarif | |