Skip to content

Update base image

Update base image #172

Workflow file for this run

name: Update base image
on:
push:
branches:
- main
paths:
- image/Dockerfile-base
- .github/workflows/base-image.yaml
schedule:
- cron: 0 1 * * 1
jobs:
push_image:
runs-on: ubuntu-latest
name: Docker Images
env:
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Registry login
run: |
echo $DOCKER_TOKEN | docker login --username danielflook --password-stdin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Base image
run: |
docker buildx build \
--tag danielflook/terraform-github-actions-base:$GITHUB_RUN_ID \
--tag danielflook/terraform-github-actions-base:latest \
--platform linux/amd64,linux/arm64 \
--attest type=provenance,mode=max,builder-id=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID \
--file image/Dockerfile-base \
--push \
--iidfile manifest-list-digest.txt \
image
echo "digest=$(<manifest-list-digest.txt)" >> "$GITHUB_OUTPUT"