8000 Test Build by fqjony · Pull Request #85 · udx/docker-sftp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Test Build #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weâ 8000 €™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Test Build

on:
push:
branches-ignore:
- master

env:
# GCP and Artifact Registry configuration
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
AR_LOCATION: ${{ vars.AR_LOCATION }}
AR_REPOSITORY: ${{ vars.AR_REPOSITORY }}
IMAGE_NAME: ${{vars.AR_LOCATION}}-docker.pkg.dev/${{secrets.GKE_PROJECT}}/${{vars.AR_REPOSITORY}}

jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
if: github.event_name == 'push'
permissions:
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Get version from package.json
- name: Get Tag from package.json
id: version
run: echo "TAG=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT

# Configure Docker for Artifact Registry
- name: Configure Docker authentication for Artifact Registry
run: |-
gcloud --quiet auth configure-docker $AR_LOCATION-docker.pkg.dev

# Set lowercase branch name
- name: Set lowercase branch name
run: echo "BRANCH_NAME=$(echo "${{ github.ref_name }}" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV

# Build the Docker image
- name: Build
run: |-
docker build \
--tag "${{env.IMAGE_NAME}}/${{ env.BRANCH_NAME }}:${{ steps.version.outputs.TAG }}" \
--build-arg GITHUB_SHA="$GITHUB_SHA" \
--build-arg GITHUB_REF="$GITHUB_REF" \
.

# Scan Docker image for vulnerabilities
- name: Scan for vulnerabilities
uses: aquasecurity/trivy-action@master
with:
image-ref: "${{env.IMAGE_NAME}}/${{ env.BRANCH_NAME }}:${{ steps.version.outputs.TAG }}"
exit-code: "1"
severity: "CRITICAL"
timeout: "10m0s"
format: "table"
scan-type: "image"
scanners: "vuln"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y \
authbind=2.2.0ubuntu1 \
wget=1.24.5-2ubuntu1 \
gnupg2=2.4.4-2ubuntu22 \
apt-transport-https=2.9.31ubuntu3 \
apt-transport-https=2.9.32ubuntu1 \
libssl-dev=3.4.1-1ubuntu1 \
libffi-dev=3.4.7-1 \
file=1:5.45-3build1 \
Expand Down
5 changes: 3 additions & 2 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### 0.7.1
* `axios` → `^1.8.3`
* `firebase-admin` → `^13.2.0`
* Docker `apt-transport-https` → `2.9.32ubuntu1`
* NPM `axios` → `^1.8.3`
* NPM `firebase-admin` → `^13.2.0`
* Fixed package versions alignment

### 0.7.0
Expand Down
0