Browse Source

Enable tagged containers by commit

Seungmin Kim 2 years ago
parent
commit
4aba06dcde
3 changed files with 13 additions and 5 deletions
  1. 1 1
      .github/FUNDING.yml
  2. 10 4
      .github/workflows/container-publish.yml
  3. 2 0
      Dockerfile

+ 1 - 1
.github/FUNDING.yml

@@ -1 +1 @@
-github: [ehfd]
+github: [ehfd, danisla]

+ 10 - 4
.github/workflows/container-publish.yml

@@ -19,7 +19,9 @@ jobs:
       packages: write
     steps:
     - name: Checkout repository
-      uses: actions/checkout@v3
+      uses: actions/checkout@v4
+    - name: Fetch commit time
+      run: echo "COMMIT_TIME_GIT=$(TZ=UTC git show -s --format='%cd' --date=format-local:'%Y%m%d%H%M%S')" >> $GITHUB_ENV
     - name: Log into registry ${{ env.REGISTRY }}
       if: github.event_name != 'pull_request'
       uses: docker/login-action@v2
@@ -33,7 +35,7 @@ jobs:
       with:
         images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
     - name: Build and push Ubuntu 20.04 Container image
-      uses: docker/build-push-action@v3
+      uses: docker/build-push-action@v4
       with:
         build-args: |
           UBUNTU_RELEASE=20.04
@@ -41,6 +43,7 @@ jobs:
         push: ${{ github.event_name != 'pull_request' }}
         tags: |
           ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:20.04
+          ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:20.04-${{ env.COMMIT_TIME_GIT }}
         labels: ${{ steps.meta.outputs.labels }}
   build-2204:
     runs-on: ubuntu-latest
@@ -49,7 +52,9 @@ jobs:
       packages: write
     steps:
     - name: Checkout repository
-      uses: actions/checkout@v3
+      uses: actions/checkout@v4
+    - name: Fetch commit time
+      run: echo "COMMIT_TIME_GIT=$(TZ=UTC git show -s --format='%cd' --date=format-local:'%Y%m%d%H%M%S')" >> $GITHUB_ENV
     - name: Log into registry ${{ env.REGISTRY }}
       if: github.event_name != 'pull_request'
       uses: docker/login-action@v2
@@ -63,7 +68,7 @@ jobs:
       with:
         images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
     - name: Build and push Ubuntu 22.04 Container image
-      uses: docker/build-push-action@v3
+      uses: docker/build-push-action@v4
       with:
         build-args: |
           UBUNTU_RELEASE=22.04
@@ -72,4 +77,5 @@ jobs:
         tags: |
           ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
           ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:22.04
+          ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:22.04-${{ env.COMMIT_TIME_GIT }}
         labels: ${{ steps.meta.outputs.labels }}

+ 2 - 0
Dockerfile

@@ -244,6 +244,8 @@ Pin-Priority: -1" > /etc/apt/preferences.d/firefox-nosnap && \
         dolphin-plugins \
         dbus-x11 \
         fcitx \
+        fcitx-frontend-gtk2 \
+        fcitx-frontend-gtk3 \
         fcitx-frontend-qt5 \
         fcitx-module-dbus \
         fcitx-module-kimpanel \