Changed registry to quay.io

This commit is contained in:
Muhamad Aditya Prima 2024-12-16 03:50:06 +07:00
parent ce2b0be644
commit 5685eada11
2 changed files with 11 additions and 26 deletions

View File

@ -6,22 +6,6 @@ on:
- master - master
jobs: jobs:
# prepare:
# name: Get build meta
# runs-on: ubuntu-latest
# container:
# image: ghcr.io/catthehacker/ubuntu:act-latest
# steps:
# - name: Check out repository code
# uses: actions/checkout@v4
# - name: Get build-meta.json content
# id: get-build-meta
# uses: ActionsTools/read-json-action@main
# with:
# file_path: "build-meta.json"
# outputs:
# versions: ${{ steps.get-build-meta.outputs.versions }}
build: build:
name: Build alpine linux container images name: Build alpine linux container images
container: container:
@ -57,8 +41,9 @@ jobs:
- name: Login to docker.io - name: Login to docker.io
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
username: ${{ vars.DOCKERHUB_USERNAME }} registry: quay.io
password: ${{ secrets.DOCKERHUB_TOKEN }} username: ${{ vars.QUAY_USERNAME }}
password: ${{ secrets.QUAY_SECRET }}
# - name: Set up QEMU # - name: Set up QEMU
# uses: docker/setup-qemu-action@v3 # uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx - name: Setup Docker buildx
@ -72,11 +57,11 @@ jobs:
build-args: | build-args: |
ALPINE_VERSION=${{ matrix.version }} ALPINE_VERSION=${{ matrix.version }}
tags: | tags: |
${{ vars.DOCKERHUB_USERNAME }}/alpine:${{ matrix.version }} quay.io/sindigilive/alpine:${{ matrix.version }}
- name: Scan container image with Trivy - name: Scan container image with Trivy
uses: aquasecurity/trivy-action@0.20.0 uses: aquasecurity/trivy-action@0.20.0
with: with:
image-ref: '${{ vars.DOCKERHUB_USERNAME }}/alpine:${{ matrix.version }}' image-ref: 'quay.io/sindigilive/alpine:${{ matrix.version }}'
format: 'sarif' format: 'sarif'
output: 'trivy-results.sarif' output: 'trivy-results.sarif'
@ -94,8 +79,9 @@ jobs:
- name: Login to docker.io - name: Login to docker.io
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
username: ${{ vars.DOCKERHUB_USERNAME }} registry: quay.io
password: ${{ secrets.DOCKERHUB_TOKEN }} username: ${{ vars.QUAY_USERNAME }}
password: ${{ secrets.QUAY_SECRET }}
# - name: Set up QEMU # - name: Set up QEMU
# uses: docker/setup-qemu-action@v3 # uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx - name: Setup Docker buildx
@ -107,10 +93,10 @@ jobs:
push: true push: true
context: . context: .
tags: | tags: |
${{ vars.DOCKERHUB_USERNAME }}/alpine:latest quay.io/sindigilive/alpine:latest
- name: Scan container image with Trivy - name: Scan container image with Trivy
uses: aquasecurity/trivy-action@0.20.0 uses: aquasecurity/trivy-action@0.20.0
with: with:
image-ref: '${{ vars.DOCKERHUB_USERNAME }}/alpine:latest' image-ref: 'quay.io/sindigilive/alpine:latest'
format: 'sarif' format: 'sarif'
output: 'trivy-results.sarif' output: 'trivy-results.sarif'

View File

@ -9,8 +9,7 @@ ARG TZ=Asia/Jakarta
USER root USER root
# Install base dependencies, set timezone to designated timezone # Install base dependencies, set timezone to designated timezone
RUN --mount=type=cache,target=/var/cache/apk \ RUN /sbin/apk update --no-cache; \
/sbin/apk update --no-cache; \
/sbin/apk upgrade --no-cache; \ /sbin/apk upgrade --no-cache; \
/sbin/apk add --update --no-cache \ /sbin/apk add --update --no-cache \
tzdata; \ tzdata; \