Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

perf: change docker file #3

perf: change docker file

perf: change docker file #3

Workflow file for this run

name: Build and Push Base Image
on:
push:
branches:
- 'pr*'
paths:
- 'versions.txt'
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract date
id: vars
run: echo "IMAGE_TAG=$(date +'%Y%m%d_%H%M%S')" >> $GITHUB_ENV
- name: Extract repository name
id: repo
run: echo "REPO=$(basename ${{ github.repository }})" >> $GITHUB_ENV
- name: Build and push multi-arch image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: jumpserver/${{ env.REPO }}:${{ env.IMAGE_TAG }}
file: Dockerfile
- name: Get current branch name
id: get_branch
run: echo "current_branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
- name: Set up Git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Update docker-web dependencies applets
run: |
git clone https://github.com/jumpserver/docker-web.git
cd docker-web
git checkout -b ${{ env.current_branch }}
sed -i 's|jumpserver/web-static:.* |jumpserver/web-static:${{ env.IMAGE_TAG }} |' Dockerfile-ee
git add Dockerfile-ee
git commit -m "perf: Update Dockerfile-ee web static version"
- name: Push changes
run: |
cd docker-web
git remote set-url origin https://${{ secrets.PRIVATE_TOKEN }}@github.com/jumpserver/docker-web.git
git push origin ${{ env.current_branch }}