Skip to content
Merged
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
33 changes: 33 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
jobs:
release:
runs-on: ubuntu-latest
permissions:
packages: write

steps:
- name: Checkout code
Expand Down Expand Up @@ -67,3 +69,34 @@ jobs:
with:
name: StealthIMFileAPI.docker.zst
path: ./bin/StealthIMFileAPI.docker.zst

upload-package:
runs-on: ubuntu-latest
needs: release

steps:
- name: Download File
uses: actions/download-artifact@v4
with:
name: StealthIMFileAPI.docker.zst

- name: Unpack File
run: |
sudo apt-get update
sudo apt-get install -y zstd
zstd -d StealthIMFileAPI.docker.zst

- name: Load Docker image
run: docker load -i StealthIMFileAPI.docker

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Tag and push Docker image
run: |
docker tag $(docker images -q | head -n 1) ghcr.io/$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')/$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]')/stealthimfileapi-app:latest
docker push ghcr.io/$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')/$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]')/stealthimfileapi-app:latest
Loading