diff --git a/.github/workflows/container-cleanup.yml b/.github/workflows/container-cleanup.yml new file mode 100644 index 0000000..1f61302 --- /dev/null +++ b/.github/workflows/container-cleanup.yml @@ -0,0 +1,19 @@ +name: Container Registry Cleanup + +permissions: + contents: read + packages: write + +on: + push: + branches: + - main + schedule: + - cron: '15 2 * * MON' + +jobs: + untagged-cleanup: + uses: "tweedegolf/actions-container-helpers/.github/workflows/container-untagged-cleanup.yml@main" + secrets: inherit + with: + package: debian diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml deleted file mode 100644 index e08b61d..0000000 --- a/.github/workflows/docker-image.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: Docker Image - -on: - workflow_call: - inputs: - tags: - description: "List of image tags (newline separated) for the resulting docker image" - required: true - type: string - push: - description: "If true, the image will be pushed to the registry" - required: false - default: false - type: boolean - platforms: - description: "Comma separated list of platforms to build the image for" - required: false - default: "linux/amd64,linux/arm64" - type: string - context: - description: "Context directory for the docker build" - required: false - default: "." - type: string - build-args: - description: "List of build arguments (newline separated) to be inserted in the docker build" - required: false - default: "" - type: string - file: - description: "Name of the dockerfile to build" - required: false - default: "Dockerfile" - type: string - -jobs: - image: - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3.2.0 - - - name: Login to GitHub Container Registry - uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build${{ inputs.push && ' and push' || ''}} - uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 - with: - context: "${{ inputs.context }}" - file: "${{ inputs.file }}" - platforms: "${{ inputs.platforms }}" - no-cache: true - pull: true - build-args: "${{ inputs.build-args }}" - push: ${{ inputs.push }} - tags: "${{ inputs.tags }}"