Skip to content

Commit

Permalink
Update tool versions, fix Docker build on Apple Silicon (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru authored Jan 26, 2024
1 parent 896b366 commit 2cfc93f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 15 deletions.
Binary file modified .github/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 11 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ on:
jobs:
build-and-push:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
cancel-in-progress: true

steps:
- name: "Checkout source code at current commit"
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Prepare tags for Docker image
if: (github.event_name == 'release' && github.event.action == 'published') || github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
id: prepare
Expand Down Expand Up @@ -59,23 +63,25 @@ jobs:
echo "slim-tags=${SLIM_TAGS}" >> "$GITHUB_OUTPUT"
printf "SLIM_TAGS are %s\n" "${SLIM_TAGS}"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: (github.event_name == 'release' && github.event.action == 'published') || github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: "Build and push full docker image to DockerHub"
id: docker_full_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
push: ${{ (github.event_name == 'release' && github.event.action == 'published') || github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
tags: ${{ steps.prepare.outputs.tags }}
platforms: linux/amd64
- name: "Build and push slim docker image to DockerHub"
id: docker_slim_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
file: ./Dockerfile.slim
push: ${{ (github.event_name == 'release' && github.event.action == 'published') || github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
tags: ${{ steps.prepare.outputs.slim-tags }}
platforms: linux/amd64
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Lint Code Base
uses: github/super-linter/slim@v5
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/vhs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
cancel-in-progress: true

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Docker Buildx (for demo tape)
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Tune vim settings
run: |
Expand All @@ -34,7 +34,7 @@ jobs:
path: demo.tape
install-fonts: true

- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@v5
id: auto-commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.7-alpine3.18
FROM golang:1.20.13-alpine3.18
LABEL maintainer="Cloud Posse <[email protected]>"

LABEL "com.github.actions.name"="Build Harness"
Expand All @@ -8,6 +8,7 @@ LABEL "com.github.actions.color"="blue"

RUN apk --update --no-cache add \
bash \
build-base \
ca-certificates \
coreutils \
curl \
Expand All @@ -27,12 +28,12 @@ RUN apk --update --no-cache add \
py3-cffi && \
python3 -m pip install --upgrade pip setuptools wheel && \
pip3 install --no-cache-dir \
cryptography==41.0.3 \
cryptography==41.0.7 \
PyYAML==6.0.1 \
awscli==1.29.25 \
awscli==1.32.23 \
boto==2.49.0 \
boto3==1.28.25 \
iteration-utilities==0.11.0 \
boto3==1.34.23 \
iteration-utilities==0.12.0 \
PyGithub==1.59.1 && \
git config --global advice.detachedHead false

Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export BUILD_HARNESS_OS ?= $(OS)
export BUILD_HARNESS_ARCH ?= $(shell uname -m | sed 's/x86_64/amd64/g')
export SELF ?= $(MAKE)
export PATH := $(BUILD_HARNESS_PATH)/vendor:$(PATH)
export DOCKER_BUILD_FLAGS ?=
# We do not have Alpine packages for arm64, so we need to force amd64 until we switch to Debian
export DOCKER_BUILD_FLAGS ?= --platform linux/amd64

# Forces auto-init off to avoid invoking the macro on recursive $(MAKE)
export BUILD_HARNESS_AUTO_INIT := false
Expand Down

0 comments on commit 2cfc93f

Please sign in to comment.