forked from ajilach/clamav-rest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from GSA-TTS/feature/support-proxy-for-freshclam
Feature/support proxy for freshclam
- Loading branch information
Showing
4 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
name: Build and Publish ClamAV Image | ||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
env: | ||
DOCKER_NAME: clamav-rest | ||
IMAGE: clamav | ||
GH_REPO: GSA-TTS/clamav-rest | ||
|
||
jobs: | ||
build-clamav: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Get Date | ||
shell: bash | ||
id: date | ||
run: | | ||
echo "date=$(date +%Y%m%d)" >> $GITHUB_OUTPUT | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build Docker Image | ||
run: docker build . -t ${{ env.DOCKER_NAME }}:${{ steps.date.outputs.date }} | ||
|
||
- name: Tag Image | ||
run: | | ||
docker tag ${{ env.DOCKER_NAME }}:${{ steps.date.outputs.date }} ghcr.io/${{ env.GH_REPO }}/${{ env.IMAGE }}:${{ steps.date.outputs.date }} | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push Image | ||
run: docker push --all-tags ghcr.io/${{ env.GH_REPO }}/${{ env.IMAGE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters