Skip to content

no-cache docker build #16

no-cache docker build

no-cache docker build #16

name: Publish Docker Image
on:
push:
tags:
- "v*.*.*"
jobs:
build-and-publish-amd64:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
docker build --no-cache -t ghcr.io/${{ github.repository_owner }}/jlc-parts:latest-amd64 -t ghcr.io/${{ github.repository_owner }}/jlc-parts:${{github.ref_name}}-amd64 .
docker push ghcr.io/${{ github.repository_owner }}/jlc-parts --all-tags
build-and-publish-arm64:
runs-on: [self-hosted, ARM64]
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
docker build --no-cache -t ghcr.io/${{ github.repository_owner }}/jlc-parts:latest-arm64 -t ghcr.io/${{ github.repository_owner }}/jlc-parts:${{github.ref_name}}-arm64 .
docker push ghcr.io/${{ github.repository_owner }}/jlc-parts --all-tags