ci
All checks were successful
build image / build image (push) Successful in 39s

This commit is contained in:
jeff 2024-06-04 00:49:35 -07:00
parent 084388d3b8
commit bed03dd1ee
Signed by: jeff
GPG Key ID: 6672802D9BEE23CB
2 changed files with 35 additions and 33 deletions

View File

@ -7,11 +7,9 @@ on:
jobs: jobs:
build image: build image:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps: steps:
- name: code checkout - name: code checkout
uses: actions/checkout@v3 uses: actions/checkout@v4.1.6
- name: docker login - name: docker login
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
@ -24,10 +22,14 @@ jobs:
tag=$(echo ${{ github.sha }} | cut -b 1-8) tag=$(echo ${{ github.sha }} | cut -b 1-8)
echo "::set-output name=tag::$tag" echo "::set-output name=tag::$tag"
- name: build and push - name: build and push
uses: docker/build-push-action@master uses: docker/build-push-action@v5.3.0
with: with:
platforms: linux/amd64 platforms: linux/amd64
push: true push: true
build-args: |
REGISTRY_DOCKER_HUB=${{ vars.REGISTRY_DOCKER_HUB }}
REGISTRY_GCR=${{ vars.REGISTRY_GCR }}
REGISTRY_SIMPLE_SYSTEMS=${{ vars.REGISTRY_SIMPLE_SYSTEMS }}
tags: | tags: |
registry.digitalocean.com/ssdocker/${{ github.repository }}:${{ steps.create-tag.outputs.tag }} registry.digitalocean.com/ssdocker/${{ github.repository }}:${{ steps.create-tag.outputs.tag }}
registry.digitalocean.com/ssdocker/${{ github.repository }}:latest registry.digitalocean.com/ssdocker/${{ github.repository }}:latest

View File

@ -1,5 +1,6 @@
# STEP 1: Build the website's files ARG REGISTRY_DOCKER_HUB
FROM alpine:latest AS build-website ARG REGISTRY_SIMPLE_SYSTEMS
FROM $REGISTRY_DOCKER_HUB/alpine:latest AS build-website
WORKDIR /src WORKDIR /src
@ -12,8 +13,7 @@ RUN apk update && apk upgrade && \
RUN hugo --minify RUN hugo --minify
# STEP 2: Add static files to webserver image FROM $REGISTRY_SIMPLE_SYSTEMS/simplesystems/static-web-server:609f2b47
FROM registry.digitalocean.com/ssdocker/simplesystems/static-web-server:latest
WORKDIR /app WORKDIR /app