Skip to content

WIP ansible again

WIP ansible again #73

Workflow file for this run

# I mostly copied this straight from here:
# https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
# oscar's tests, etc. run during image build, so that's all this pipeline does
name: main
on:
push:
branches: ['**']
jobs:
main:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# Generate any tags we want for the images (https://github.com/docker/build-push-action/blob/master/docs/advanced/tags-labels.md)
- name: Extract metadata (tags, labels) for OCI image
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/opensourcecorp/oscar
tags: |
type=sha
# non-mainline
- name: Build and push non-mainline OCI image
if: github.ref != 'refs/heads/main'
uses: docker/build-push-action@v3
with:
context: .
file: Containerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
# mainline
- name: Build and push mainline OCI image
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v3
with:
context: .
file: Containerfile
push: true
tags: ghcr.io/opensourcecorp/oscar:latest
# name: main
# on:
# push:
# branches:
# - '**'
# pull_request:
# branches:
# - '**'
# jobs:
# main:
# name: ${{ matrix.config.os }}
# runs-on: ${{ matrix.config.os }}
# strategy:
# matrix:
# config:
# - {os: ubuntu-latest}
# steps:
# - uses: actions/checkout@v2
# - name: Build & test
# run: make image-build