Merge pull request #3 from wayofdev/fix/workflows #1
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
name: 📍 Update base image | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- image/Dockerfile-base | |
- .github/workflows/create-base-image.yaml | |
env: | |
REGISTRY: "ghcr.io" | |
REPO_NAME: ${{ github.event.repository.name }} | |
jobs: | |
push_image: | |
runs-on: ubuntu-latest | |
name: Docker Images | |
steps: | |
- name: 📦 Checkout | |
uses: actions/checkout@v3 | |
- name: 🔑 Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.PERSONAL_GITHUB_TOKEN }} | |
- name: 🔨 Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: 🚀 Build base image | |
run: | | |
docker buildx build \ | |
--tag $REGISTRY/${GITHUB_REPOSITORY_OWNER,,}/$REPO_NAME-base:$GITHUB_RUN_ID \ | |
--tag $REGISTRY/${GITHUB_REPOSITORY_OWNER,,}/$REPO_NAME-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" |