diff --git a/.github/workflows/auto-build-image.yml b/.github/workflows/auto-build-image.yml deleted file mode 100644 index 10bbe5f..0000000 --- a/.github/workflows/auto-build-image.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: Build Clam AV Every Week -on: - schedule: - - cron: '0 4 * * 0' - -jobs: - create-docker-image: - name: Build a Docker image on Sunday at 4 am - uses: ./.github/workflows/build-image.yml - secrets: inherit diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 8e7ec2b..2b84881 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -2,7 +2,8 @@ name: Build and Publish ClamAV Image on: workflow_dispatch: - workflow_call: + schedule: + - cron: '0 4 * * 0' env: DOCKER_NAME: clamav-rest diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 37375f7..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,70 +0,0 @@ -name: Build, Push Container image to DockerHub - -on: - workflow_dispatch: - schedule: - - cron: '0 0 * * 6' # At 12:00 AM, only on Saturday - -env: - IMAGE_NAME: "clamav-rest" - - REGISTRY_USER: ajilaag - REGISTRY_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - -permissions: - contents: write - -jobs: - - build: - - runs-on: ubuntu-latest - - outputs: - image_digest: ${{ steps.container_metadata.outputs.digest }} - image_tags: ${{ steps.meta_dev.outputs.tags }} - - steps: - - uses: actions/checkout@v3 - - - name: Log in to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ env.REGISTRY_USER }} - password: ${{ env.REGISTRY_PASSWORD }} - - - name: Extract metadata (tags, labels) for Docker - id: meta_dev - uses: docker/metadata-action@v4 - with: - images: ajilaag/${{ env.IMAGE_NAME }} - tags: | - type=raw,value={{date 'YYYYMMDD'}} - Type=raw,value=latest,enable={{is_default_branch}} - - - name: Build and push to DockerHub - id: container_metadata - uses: docker/build-push-action@v4 - with: - context: . - push: true - tags: ${{ steps.meta_dev.outputs.tags }} - labels: ${{ steps.meta_dev.outputs.labels }} - - - name: Get current date - id: date - run: echo "::set-output name=date::$(date +'%Y%m%d')" - - - name: Add version tag - id: tag_version - uses: laputansoft/github-tag-action@v4.6 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ steps.date.outputs.date }} - - - name: Create a GitHub release - uses: ncipollo/release-action@v1 - with: - tag: ${{ steps.date.outputs.date }} - name: Release ${{ steps.date.outputs.date }} - body: ${{ steps.tag_version.outputs.changelog }}