This commit is contained in:
parent
929ba2d61b
commit
8c0dbfb6c9
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
name: Build and Push Docker Images
|
name: Build and Push Docker Images
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@ -11,8 +10,6 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build-rust-latest:
|
build-rust-latest:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: git.hofer.link/philipp/ci-images:rust-latest
|
|
||||||
#if: github.event_name == 'push' && contains(github.event.commits[0].modified, 'rust-latest/Dockerfile')
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -20,13 +17,6 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Install Docker
|
|
||||||
run: |
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y docker.io
|
|
||||||
systemctl start docker
|
|
||||||
|
|
||||||
|
|
||||||
- name: Login to Gitea Container Registry
|
- name: Login to Gitea Container Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
@ -40,3 +30,19 @@ jobs:
|
|||||||
context: ./rust-latest
|
context: ./rust-latest
|
||||||
push: true
|
push: true
|
||||||
tags: git.hofer.link/philipp/ci-images:rust-latest
|
tags: git.hofer.link/philipp/ci-images:rust-latest
|
||||||
|
cache-from: type=registry,ref=git.hofer.link/philipp/ci-images:rust-latest-cache
|
||||||
|
cache-to: type=registry,ref=git.hofer.link/philipp/ci-images:rust-latest-cache,mode=max
|
||||||
|
|
||||||
|
# You can add more jobs for other Docker images
|
||||||
|
# Example:
|
||||||
|
# build-another-image:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# steps:
|
||||||
|
# # Similar steps as above
|
||||||
|
# - name: Build and push another-image
|
||||||
|
# uses: docker/build-push-action@v4
|
||||||
|
# with:
|
||||||
|
# context: ./another-image-dir
|
||||||
|
# push: true
|
||||||
|
# tags: git.hofer.link/philipp/ci-images:another-image
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user