Compare commits
7 Commits
504d7bc16c
...
master
Author | SHA1 | Date | |
---|---|---|---|
1c4bb29074 | |||
567fb71ca7 | |||
cb33bc3555 | |||
94def554c3 | |||
5d76154a25 | |||
381523a2be | |||
5ec7086843 |
@@ -1,7 +1,11 @@
|
||||
name: Run go tests
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
push:
|
||||
paths:
|
||||
- '**.go'
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.go'
|
||||
|
||||
env:
|
||||
GOPATH: /go_path
|
||||
|
@@ -7,10 +7,13 @@ on:
|
||||
env:
|
||||
REGISTRY: git.t-juice.club
|
||||
IMAGE_NAME: ${{ gitea.repository }}
|
||||
DOCKER_TAG: nightly
|
||||
|
||||
jobs:
|
||||
release-image:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||
env:
|
||||
DOCKER_ORG: torjus
|
||||
DOCKER_TAG: nightly
|
||||
@@ -21,8 +24,9 @@ jobs:
|
||||
fetch-depth: 0 # all history for all branches and tags
|
||||
submodules: true
|
||||
github-server-url: 'https://git.t-juice.club'
|
||||
# ssh-known-hosts: "{{ secret.SSH_KNOWN_HOSTS }}"
|
||||
# ssh-key: "{{ secret.SSH_KEY }}"
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v3
|
||||
@@ -32,7 +36,7 @@ jobs:
|
||||
with:
|
||||
registry: git.t-juice.club
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.GITEA_TOKEN }}
|
||||
password: ${{ secrets.DOCKER_PUSH }}
|
||||
|
||||
- name: Get Meta
|
||||
id: meta
|
||||
@@ -49,4 +53,4 @@ jobs:
|
||||
linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/{{ env.DOCKER_ORG }}/{{ gitea.repository }}:{{ env.DOCKER_TAG }}
|
||||
${{ env.REGISTRY }}/${{ gitea.repository }}:${{ env.DOCKER_TAG }}
|
||||
|
58
.gitea/workflows/release-tag.yml
Normal file
58
.gitea/workflows/release-tag.yml
Normal file
@@ -0,0 +1,58 @@
|
||||
name: release-tag
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
REGISTRY: git.t-juice.club
|
||||
IMAGE_NAME: ${{ gitea.repository }}
|
||||
DOCKER_TAG: latest
|
||||
|
||||
jobs:
|
||||
release-image:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||
env:
|
||||
DOCKER_ORG: torjus
|
||||
DOCKER_TAG: latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # all history for all branches and tags
|
||||
submodules: true
|
||||
github-server-url: 'https://git.t-juice.club'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to git.t-juice.club registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.t-juice.club
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.DOCKER_PUSH }}
|
||||
|
||||
- name: Get Meta
|
||||
id: meta
|
||||
run: |
|
||||
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
||||
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ gitea.repository }}:${{ steps.meta.outputs.REPO_VERSION }}
|
||||
${{ env.REGISTRY }}/${{ gitea.repository }}:${{ env.DOCKER_TAG }}
|
Reference in New Issue
Block a user