This repository has been archived by the owner on Jun 27, 2024. It is now read-only.
[Snyk] Security upgrade alpine from 3.16.0 to 3.16 #506
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: CI PR/Branch | |
on: | |
push: | |
branches-ignore: | |
- master | |
pull_request: | |
env: | |
IMAGE_NAME: homecentr/base | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: read | |
strategy: | |
matrix: | |
base: [ "alpine" ] | |
steps: | |
- uses: actions/checkout@master | |
- name: Set tag var | |
id: vars | |
run: echo ::set-output name=docker_tag::$(echo ${GITHUB_REF} | cut -d'/' -f3)-${GITHUB_SHA} | |
- name: Verify Dockerfile with Hadolint | |
uses: brpaz/hadolint-action@master | |
with: | |
dockerfile: "${{ matrix.base }}/Dockerfile" | |
- name: Build Docker image | |
run: "cd ${{ matrix.base }} && docker build . -t ${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.docker_tag }}-${{ matrix.base }}" | |
- name: Test Docker image | |
run: | | |
chmod 777 ${{ matrix.base }}/example | |
chmod a+x ${{ matrix.base }}/example/* | |
cd tests | |
gradle test --info -Ddocker_image_tag=${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.docker_tag }}-${{ matrix.base }} -Dbase=${{ matrix.base }} | |
env: # To allow downloading packages | |
GITHUB_USERNAME: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |