Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c365d3438b | ||
|
|
4b53105631 | ||
|
|
7dfbeb41cb | ||
|
|
777ae24e4e |
1 changed files with 16 additions and 4 deletions
|
|
@ -17,6 +17,8 @@ on:
|
||||||
env:
|
env:
|
||||||
REGISTRY: forge.pc-rytteren.dk
|
REGISTRY: forge.pc-rytteren.dk
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
STORAGE_DRIVER: vfs
|
||||||
|
PODMAN_USERNS: disabled
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -28,6 +30,16 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
- name: Configure Buildah storage
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.config/containers
|
||||||
|
cat > ~/.config/containers/storage.conf <<EOF
|
||||||
|
[storage]
|
||||||
|
driver = "vfs"
|
||||||
|
runroot = "/tmp/run"
|
||||||
|
graphroot = "/tmp/storage"
|
||||||
|
EOF
|
||||||
|
|
||||||
- name: Get current date
|
- name: Get current date
|
||||||
id: date
|
id: date
|
||||||
run: echo "date=$(date +'%Y%m%d')" >> $FORGEJO_OUTPUT
|
run: echo "date=$(date +'%Y%m%d')" >> $FORGEJO_OUTPUT
|
||||||
|
|
@ -50,13 +62,13 @@ jobs:
|
||||||
- name: Log into Forgejo Container Registry
|
- name: Log into Forgejo Container Registry
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
buildah login -u ${{ github.actor }} -p ${{ secrets.PACKAGE_TOKEN }} ${{ env.REGISTRY }}
|
podman login -u ${{ github.actor }} -p ${{ secrets.PACKAGE_TOKEN }} ${{ env.REGISTRY }}
|
||||||
|
|
||||||
- name: Build image with Buildah
|
- name: Build image with Buildah
|
||||||
id: build-image
|
id: build-image
|
||||||
run: |
|
run: |
|
||||||
# Vi bygger med 'raw-img' lokalt
|
# Vi bygger med 'raw-img' lokalt
|
||||||
buildah bud \
|
podman build \
|
||||||
--label "org.opencontainers.image.source=https://forge.pc-rytteren.dk/${{ github.repository }}" \
|
--label "org.opencontainers.image.source=https://forge.pc-rytteren.dk/${{ github.repository }}" \
|
||||||
-t raw-img .
|
-t raw-img .
|
||||||
|
|
||||||
|
|
@ -69,8 +81,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
for tag in $(echo "${{ steps.meta.outputs.tags }}"); do
|
for tag in $(echo "${{ steps.meta.outputs.tags }}"); do
|
||||||
echo "Tagging and pushing: $tag"
|
echo "Tagging and pushing: $tag"
|
||||||
buildah tag raw-img "$tag"
|
podman tag raw-img "$tag"
|
||||||
buildah push "$tag"
|
podman push "$tag"
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Install cosign
|
- name: Install cosign
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue