Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows: build and push ignition-validate container from GH Actions #1336

Merged
merged 2 commits into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,29 @@ name: Container
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]

permissions:
contents: read

# avoid races when pushing containers built from main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
build-container:
name: Build container image
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Build container image
run: podman build -f Dockerfile.validate .
- name: Build and push container
uses: coreos/actions-lib/build-container@main
with:
credentials: ${{ secrets.QUAY_AUTH }}
file: Dockerfile.validate
push: quay.io/coreos/ignition-validate
# Speed up PR CI by skipping arm64
pr-arches: amd64
2 changes: 1 addition & 1 deletion Dockerfile.validate
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM registry.fedoraproject.org/fedora:35 AS builder
RUN dnf install -y golang git
RUN dnf install -y golang git-core
RUN mkdir /ignition-validate
COPY . /ignition-validate
WORKDIR /ignition-validate
Expand Down
1 change: 0 additions & 1 deletion build_for_container
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ export GO11MODULE=on
export CGO_ENABLED=0
export GOFLAGS='-mod=vendor'
export GOOS=linux
export GOARCH=amd64

go build -ldflags "${GLDFLAGS}" -o ${BIN_PATH}/ignition-validate ${REPO_PATH}/validate