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
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:
name: Build alpine linux container images
container:
@ -57,8 +41,9 @@ jobs:
- name: Login to docker.io
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: quay.io
username: ${{ vars.QUAY_USERNAME }}
password: ${{ secrets.QUAY_SECRET }}
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx
@ -72,11 +57,11 @@ jobs:
build-args: |
ALPINE_VERSION=${{ matrix.version }}
tags: |
${{ vars.DOCKERHUB_USERNAME }}/alpine:${{ matrix.version }}
quay.io/sindigilive/alpine:${{ matrix.version }}
- name: Scan container image with Trivy
uses: aquasecurity/trivy-action@0.20.0
with:
image-ref: '${{ vars.DOCKERHUB_USERNAME }}/alpine:${{ matrix.version }}'
image-ref: 'quay.io/sindigilive/alpine:${{ matrix.version }}'
format: 'sarif'
output: 'trivy-results.sarif'
@ -94,8 +79,9 @@ jobs:
- name: Login to docker.io
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: quay.io
username: ${{ vars.QUAY_USERNAME }}
password: ${{ secrets.QUAY_SECRET }}
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx
@ -107,10 +93,10 @@ jobs:
push: true
context: .
tags: |
${{ vars.DOCKERHUB_USERNAME }}/alpine:latest
quay.io/sindigilive/alpine:latest
- name: Scan container image with Trivy
uses: aquasecurity/trivy-action@0.20.0
with:
image-ref: '${{ vars.DOCKERHUB_USERNAME }}/alpine:latest'
image-ref: 'quay.io/sindigilive/alpine:latest'
format: 'sarif'
output: 'trivy-results.sarif'

View File

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