Merge branch 'main' into renovate/node-26.x
Docker Build and Push / build (pull_request) Failing after 6m1s
Docker Build and Push / build (pull_request) Failing after 6m1s
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
name: Docker Build and Push
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Login to Docker Hub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v6
|
||||
with:
|
||||
images: jcabillot/opencode
|
||||
tags: |
|
||||
#type=ref,event=branch
|
||||
#type=ref,event=pr
|
||||
#type=sha
|
||||
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
pull: true
|
||||
+1
-1
@@ -17,7 +17,7 @@ RUN apt-get update && \
|
||||
chown -R 1000:1000 /usr/local/lib/node_modules/n2-soul/
|
||||
|
||||
COPY --chmod=755 opencode-attach /usr/local/bin/opencode-attach
|
||||
COPY --from=registry.k8s.io/kubectl:v1.35.3 /bin/kubectl /usr/local/bin/kubectl
|
||||
COPY --from=registry.k8s.io/kubectl:v1.36.1 /bin/kubectl /usr/local/bin/kubectl
|
||||
|
||||
USER opencode
|
||||
WORKDIR /home/opencode
|
||||
|
||||
Reference in New Issue
Block a user