Update base image #217
This file contains hidden or 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: | |
| - main | |
| paths: | |
| - image/Dockerfile-base | |
| - .github/workflows/base-image.yaml | |
| schedule: | |
| - cron: 0 1 * * 1 | |
| permissions: | |
| contents: read | |
| jobs: | |
| push_image: | |
| runs-on: ubuntu-24.04 | |
| name: Docker Images | |
| env: | |
| DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - 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" |