2023-01-12 19:54:53 +02:00
|
|
|
name: 'Sync images and artifacts to ghcr'
|
2022-06-16 15:43:01 +03:00
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '30 1 * * *'
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-01-13 00:49:42 -08:00
|
|
|
workflow_dispatch:
|
2022-06-16 15:43:01 +03:00
|
|
|
|
2023-06-01 16:53:50 -07:00
|
|
|
permissions: read-all
|
2022-07-16 23:22:38 +00:00
|
|
|
|
2022-06-16 15:43:01 +03:00
|
|
|
jobs:
|
|
|
|
sync-golang:
|
2023-01-12 19:54:53 +02:00
|
|
|
name: 'golang'
|
2023-06-01 16:53:50 -07:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
2022-09-27 11:31:54 -07:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
golang_version:
|
2024-03-20 20:53:11 +02:00
|
|
|
- "1.22"
|
2022-06-16 15:43:01 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Log in to GitHub Docker Registry
|
2023-09-18 11:34:57 -07:00
|
|
|
uses: docker/login-action@v3
|
2022-06-16 15:43:01 +03:00
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Tag and push golang to ghcr
|
|
|
|
run: |
|
2022-09-27 11:31:54 -07:00
|
|
|
docker trust inspect golang:${{ matrix.golang_version }}
|
|
|
|
docker pull golang:${{ matrix.golang_version }}
|
|
|
|
docker tag golang:${{ matrix.golang_version }} ghcr.io/${{ github.repository_owner }}/golang:${{ matrix.golang_version }}
|
|
|
|
docker push ghcr.io/${{ github.repository_owner }}/golang:${{ matrix.golang_version }}
|
2023-01-12 19:54:53 +02:00
|
|
|
sync-trivy:
|
|
|
|
name: 'trivy-db'
|
2023-06-01 16:53:50 -07:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
2023-01-12 19:54:53 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Copy trivy-db using oras cli
|
|
|
|
run: |
|
2023-01-12 18:44:45 +00:00
|
|
|
oras login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
|
2023-01-12 20:01:43 +02:00
|
|
|
oras copy ghcr.io/aquasecurity/trivy-db:2 ghcr.io/${{ github.repository_owner }}/trivy-db:2
|
2024-04-19 00:08:36 -07:00
|
|
|
sync-localstack:
|
|
|
|
name: 'localstack'
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
localstack_version:
|
|
|
|
- "3.3.0"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Log in to GitHub Docker Registry
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Tag and push localstack to ghcr
|
|
|
|
run: |
|
2024-04-21 22:30:00 -07:00
|
|
|
docker pull localstack/localstack:${{ matrix.localstack_version }}
|
|
|
|
docker tag localstack/localstack:${{ matrix.localstack_version }} ghcr.io/${{ github.repository_owner }}/ci-images/localstack:${{ matrix.localstack_version }}
|
2024-04-19 00:08:36 -07:00
|
|
|
docker push ghcr.io/${{ github.repository_owner }}/ci-images/localstack:${{ matrix.localstack_version }}
|