-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: modernize toolchain, ad release workflow
- Loading branch information
Showing
5 changed files
with
51 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Publish chart as OCI image to GitHub registry. Version is automatically gathered from the tag name. | ||
# For this workflow to work, GITHUB_TOKEN needs to be configured with write permissions. | ||
# Additionally, the repository must be granted access in the package settings. | ||
|
||
name: Build and publish image | ||
|
||
on: | ||
release: | ||
types: [ released ] | ||
|
||
jobs: | ||
release: | ||
name: Build and publish image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Docker build | ||
run: | | ||
docker build . \ | ||
-t ghcr.io/${{ github.repository }}:"$GITHUB_REF_NAME" | ||
- name: Docker push | ||
run: | | ||
docker push ghcr.io/${{ github.repository }}:"$GITHUB_REF_NAME" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
FROM golang:latest as build | ||
FROM golang:1.20-alpine3.17 as build | ||
|
||
LABEL maintainer="Roberto Santalla <[email protected]>" | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
RUN make | ||
RUN go mod download && \ | ||
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o ffxivapi ./http/cmd && \ | ||
chmod +rx ffxivapi | ||
|
||
|
||
FROM alpine:latest | ||
FROM alpine:3.17 | ||
|
||
RUN apk add curl | ||
RUN mkdir -p /app/http | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters