-
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.
- Loading branch information
Showing
2 changed files
with
85 additions
and
0 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,64 @@ | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
tags: | ||
- 'v*' | ||
|
||
env: | ||
SDK_VERSION: 0.11.1 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
id: setup_buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Extract metadata from Git refs and GitHub events | ||
id: extract_metadata | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
docker.io/${{ secrets.DOCKERHUB_USERNAME }}/test-image | ||
ghcr.io/${{ github.repository_owner }}/test-image | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=ref,event=branch | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build machine image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
push: true | ||
build-args: SDK_VERSION=${{ env.SDK_VERSION }} | ||
platforms: linux/amd64,linux/arm64 | ||
builder: ${{ steps.setup_buildx.outputs.name }} | ||
tags: ${{ steps.extract_metadata.outputs.tags }} | ||
labels: ${{ steps.extract_metadata.outputs.labels }} | ||
annotations: ${{ steps.extract_metadata.outputs.annotations }} | ||
cache-from: type=gha,scope=ubuntu | ||
cache-to: type=gha,mode=max,scope=ubuntu |
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,21 @@ | ||
ARG SDK_VERSION | ||
FROM cryptobughunters/sdk:${SDK_VERSION} | ||
Check warning on line 2 in Dockerfile GitHub Actions / buildDefault value for global ARG results in an empty or invalid base image name
Check warning on line 2 in Dockerfile GitHub Actions / buildDefault value for global ARG results in an empty or invalid base image name
|
||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN <<EOF | ||
set -eu | ||
apt update | ||
apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
git \ | ||
liblua5.4-dev \ | ||
luarocks | ||
EOF | ||
|
||
RUN <<EOF | ||
set -eu | ||
luarocks install --lua-version=5.4 cartesix | ||
luarocks install --lua-version=5.4 lester | ||
luarocks install --lua-version=5.4 lua-cjson | ||
luarocks install --lua-version=5.4 luazen | ||
EOF |