Skip to content

Commit

Permalink
Fix minimal tag for noble
Browse files Browse the repository at this point in the history
  • Loading branch information
zoetrope committed Oct 2, 2024
1 parent b5a5d89 commit f322ede
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 7 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: main
on:
pull_request:
env:
go-version: 1.23
jobs:
build:
name: Build images
strategy:
matrix:
ubuntu-version: ["20.04", "22.04", "24.04"]
runs-on: ubuntu-24.04
defaults:
run:
working-directory: ${{ matrix.ubuntu-version }}
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64/v8
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: v0.17.1
- name: Setup golang
uses: actions/setup-go@v5
with:
go-version: ${{ env.go-version }}
- name: Build images
if: github.event_name != 'pull_request'
run: |
TAG_MINIMAL=$(cat TAG_MINIMAL)
TAG=$(cat TAG)
BRANCH=$(cat BRANCH)
for image in ubuntu-minimal ubuntu ubuntu-dev ubuntu-debug; do
echo
echo "building $image ..."
docker buildx build \
--platform linux/amd64,linux/arm64/v8 \
-t ghcr.io/cybozu/${image}:$TAG \
-t ghcr.io/cybozu/${image}:$BRANCH \
--build-arg TAG_MINIMAL=$TAG_MINIMAL \
--build-arg TAG=$TAG \
${image}
done
6 changes: 0 additions & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: main
on:
pull_request:
push:
branches:
- 'main'
Expand All @@ -27,7 +26,6 @@ jobs:
with:
version: v0.17.1
- name: Login to container registry
if: github.event_name != 'pull_request'
run: echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USER }} --password-stdin quay.io
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -42,7 +40,6 @@ jobs:
- name: Install container-tag-exists
run: go install github.com/Hsn723/container-tag-exists@latest
- name: Build and push ubuntu-minimal image if needed
if: github.event_name != 'pull_request'
run: |
TAG_MINIMAL=$(cat TAG_MINIMAL)
for repo in quay.io ghcr.io; do
Expand Down Expand Up @@ -75,7 +72,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push images
if: github.event_name != 'pull_request'
run: |
if [ ! -f BUILDS ]; then
echo "nothing to build."
Expand All @@ -98,11 +94,9 @@ jobs:
${dir}
done
- name: Install Trivy
if: github.event_name != 'pull_request'
run: |
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
- name: Scan images
if: github.event_name != 'pull_request'
env:
YAMORY_ACCESS_TOKEN: ${{ secrets.YAMORY_ACCESS_TOKEN }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion 24.04/TAG_MINIMAL
Original file line number Diff line number Diff line change
@@ -1 +1 @@
noble-20241002
noble-20240904.1

0 comments on commit f322ede

Please sign in to comment.