From 03b9901eeee2e51c1c444347ca9ef25f5ce52957 Mon Sep 17 00:00:00 2001 From: Jordan Olshevski Date: Tue, 21 May 2024 19:28:53 -0500 Subject: [PATCH] Switch to our standard copy/paste image pipeline --- .github/workflows/.docker-image.yml.swp | Bin 12288 -> 0 bytes .github/workflows/docker-image.yml | 66 ++++++++---------------- 2 files changed, 22 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/.docker-image.yml.swp diff --git a/.github/workflows/.docker-image.yml.swp b/.github/workflows/.docker-image.yml.swp deleted file mode 100644 index 9f543e8c0f9aebef30b3deb0cfb86b8ff7e6a47c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2O>7%Q6vrnBseF|pIB-Imnns}|YbR+bWf7uDYS|`rE7An1DySXrPV6Q2t}{F9 z*a{_FIC4T<5JCtJfCN&-6$ybjAjG9YaN)wGJ-``J331>*vmeR#B!g^+K&qpDIofTn`ZP@YD5`>t8L6{rt!nc{va+^HszC*K^t~wCc>63xZW^ z))U2c;IQ_P+pBTFk`uVR6tYf(m5NPIwxUL9JrJua?O;7Dxq-9Fh2?cvlNSe_;TS_9 z&7)DkC@_iwkzBD(9VEwRru9~Tv~ZX{^x*O+p2o%~U=%P47zK<1MggOMQNSo*6!@Pg zAiHB^6LYyEna^DEJ2v#2JenV)fKk9GU=%P47zK<1MggOMQNSo*6fg=H1^$ByFqe?R z0Yc{P!r<}$|Mc(wUk?%T3%CJ(0AGSn!6)D&@E&*_48Rp|8C(PvFbNKW1K`j53AqWr z1|Ne>@FJK3e;g#_NAL~!0BnE-a1`7Le!q{9>)>tB1Xb`PxOFcfKY?rDeeedj0v5n2 zaO)mI-UXKc0XOa@3K#{90!9I&!0jkNvx{VRxtrX}koUOow%T${x!aKMY7sljflVjo7x%H)rzvr+ zE!E~{&rVirmFh&UU*(v4+}7V7F1@JjTXN9l7*r5Ww!Ma6VvrB&HT^(vEAm&oK6h;@ zMZ|NR@V+N4b(jzVrt^L)f#@)aw~{s5Jl~>^6a&&dx!HOdt#+G99?Gp)>o~Y*XM>4C9@>bAl7b7?@Y?XCp~HMUYHPT4!?YiZHX^U>TFiH?ZWOk(h0nR0 zScu3Et-!Zw)QEf;S@D=*6;FFxFP7>h4NUcw&il;y`GxWbk|=vUzM>0pia{j1kqq?% z6w`x?15^4>LuVsT18jvDZMkk^Y@-F$ZO@PTCDw6I zo%XL!o}?6ZV4A3mMz6up?Xd8t@lLYm*(1>N*s#Bp;_W6X^}BD z!C z->iD0Xxa{%o}bBiJaI|oJgZu%4ConsT$xs*Miz9hIaX>*BTXGa(w!NVYhw=u_ELWg+uWiZU^?j^cusRLJr`+G`u0XY$MQ^9mT z_V)|7#yip91$(|+Uml7P7u>Mqw79d1Y(Cvf_f@)f^GS<#9ICGNl)!`B?#Gi`-eF(F^cSrG-tKEk~$leB|I9@1P`KYwCDCov)F<0C%Ll Af&c&j diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index c9fef11..f2bab6a 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,10 +1,5 @@ name: Docker Image CI -env: - GHCR: ghcr.io - DOCKER: docker.io - IMAGENAME: samba - on: push: branches: [ "master" ] @@ -17,50 +12,33 @@ jobs: needs: - vulerability-scan steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Log in to the Github container registry + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v2 + + - name: Login uses: docker/login-action@v3 with: - registry: ${{ env.GHCR }} + registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Login to Docker Hub - uses: docker/login-action@v3 + + - uses: actions/checkout@v3 + name: Check out code + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 with: - registry: ${{ env.DOCKER }} - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Get current date - id: date - run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - - name: Build and push + images: ${{ env.REGISTRY }}/${{ github.repository }} + tags: | + type=sha + + - name: Build and push Docker image uses: docker/build-push-action@v5 with: - context: . - platforms: linux/amd64,linux/arm64 push: true - tags: | - ${{ env.GHCR }}/vremenar/${{ env.IMAGENAME }}:latest - ${{ env.GHCR }}/vremenar/${{ env.IMAGENAME }}:${{ steps.date.outputs.date }} - ${{ env.DOCKER }}/vremenar/${{ env.IMAGENAME }}:latest - ${{ env.DOCKER }}/vremenar/${{ env.IMAGENAME }}:${{ steps.date.outputs.date }} - image-vulnerability-scan: - runs-on: ubuntu-latest - needs: - - build-and-push - steps: - - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@master - with: - image-ref: '${{ env.GHCR }}/vremenar/${{ env.IMAGENAME }}:latest' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH' - + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max +