chore(ci): update action #319
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
name: Push Alpine Dev Image | |
on: | |
push: | |
branches: | |
- '0.2.2' | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
security-events: write | |
jobs: | |
push_dev_image: | |
name: Build and Push Dev Image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
- uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
driver-opts: | | |
image=moby/buildkit:v0.12.5 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: orenlab/pytmbot | |
tags: | | |
type=raw,value=alpine-dev | |
labels: | | |
org.opencontainers.image.title=pyTMbot | |
org.opencontainers.image.description=Versatile Telegram bot designed for managing Docker containers, monitoring server status, and extending its functionality through a modular plugin system | |
org.opencontainers.image.source=https://github.com/orenlab/pytmbot | |
- uses: docker/build-push-action@v5 | |
id: build-and-push | |
with: | |
context: . | |
target: production | |
file: Dockerfile | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
provenance: mode=max | |
- name: Run Vulnerability Scan | |
uses: anchore/scan-action@v3 | |
id: scan | |
with: | |
image: orenlab/pytmbot:alpine-dev | |
fail-build: false | |
severity-cutoff: high | |
acs-report-enable: true | |
sarif-file: ${{ github.workspace }}/results.sarif | |
- name: Upload SARIF (if exists) | |
if: success() && ${{ github.workspace }}/results.sarif | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: results.sarif |