CI Updates
This commit is contained in:
parent
dff37906c6
commit
84cc98c506
34
.gitea/workflows/test.yaml
Normal file
34
.gitea/workflows/test.yaml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: Gitea Actions Demo
|
||||||
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Print SHA-256 Hash of Secret
|
||||||
|
run: |
|
||||||
|
echo -n "$TEST" | sha256sum | awk '{print $1}'
|
||||||
|
env:
|
||||||
|
TEST: ${{ secrets.TEST }}
|
||||||
|
|
||||||
|
# - name: Login to container registry
|
||||||
|
# uses: docker/login-action@v3
|
||||||
|
# with:
|
||||||
|
# registry: registry.itzana.me
|
||||||
|
# username: ${{ secrets.REGISTRY_USER }}
|
||||||
|
# password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push api
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
file: Containerfile
|
||||||
|
context: .
|
||||||
|
push: false
|
||||||
|
tags: registry.itzana.me/strafesnet/test:${{ gitea.run_id }}
|
@ -7,9 +7,6 @@ WORKDIR /app
|
|||||||
# Copy go.mod and go.sum files
|
# Copy go.mod and go.sum files
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
|
|
||||||
# Download dependencies
|
|
||||||
RUN --mount=type=secret,id=netrc,dst=/root/.netrc go mod download
|
|
||||||
|
|
||||||
# Copy the entire project
|
# Copy the entire project
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user