Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dgershman committed Mar 9, 2024
0 parents commit b50dff9
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and Release

on:
push:
tags:
- v*

jobs:
build:
runs-on: ubuntu-latest

env:
GOPRIVATE: github.com/radiusmethod/license
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: "Login to GHCR"
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Build and push Docker image
run: |
curl -LO https://socketzero-public.s3.us-gov-west-1.amazonaws.com/receiver/v0.0.2/socketzero-receiver-linux-amd64-v0.0.2
set +o history && echo ${REGISTRY1_PASSWORD} | docker login registry1.dso.mil --username ${REGISTRY1_USERNAME} --password-stdin || set -o history
docker build -t ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:$GITHUB_REF_NAME .
docker push ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:$GITHUB_REF_NAME
env:
REGISTRY1_USERNAME: ${{ secrets.REGISTRY1_USERNAME }}
REGISTRY1_PASSWORD: ${{ secrets.REGISTRY1_PASSWORD }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ARG BASE_REGISTRY=registry1.dso.mil
ARG BASE_IMAGE=ironbank/google/golang/ubi9/golang-1.21
ARG BASE_TAG=1.21.7

FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}

USER root

RUN microdnf update -y --nodocs && \
microdnf clean all && \
rm -rf /var/cache/microdnf

USER nobody

COPY --chown=nobody:nobody --chmod=700 socketzero-receiver /opt/socketzero-receiver

WORKDIR /opt

ENTRYPOINT ["/opt/socketzero-receiver"]
Empty file added README.md
Empty file.

0 comments on commit b50dff9

Please sign in to comment.