Skip to content

Need to create bin directory before trying to install ourselves. #42

Need to create bin directory before trying to install ourselves.

Need to create bin directory before trying to install ourselves. #42

Workflow file for this run

name: Build and Publish Image
on:
push:
paths-ignore:
- '**/*.md'
branches:
- 'main'
- 'cs/*'
release:
types:
- released
jobs:
build-and-push-latest:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ohioit
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Log in to the Container registry
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build necessary docker images
uses: hiberbee/github-action-skaffold@1.27.0
with:
skaffold-version: 1.39.1
container-structure-test-version: 1.11.0
command: build
push: true
cache: true
tag: latest
build-and-push-branch:
if: startsWith(github.ref, 'refs/heads/cs/')
runs-on: ohioit
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Log in to the Container registry
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Determine tag name from branch name
env:
BRANCH_NAME: "${{ github.event.pull_request.head.ref }}"
run: |
echo "::set-output name=DOCKER_IMAGE_TAG::$(${BRANCH_NAME} | cut -d '/' -f 2)"
- name: Build necessary docker images
uses: hiberbee/github-action-skaffold@1.27.0
with:
skaffold-version: 1.39.1
container-structure-test-version: 1.11.0
command: build
push: true
cache: true
tag: "${{ env.DOCKER_IMAGE_TAG }}"
build-and-push-release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ohioit
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Log in to the Container registry
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build necessary docker images
uses: hiberbee/github-action-skaffold@1.27.0
with:
skaffold-version: 1.39.1
container-structure-test-version: 1.11.0
command: build
push: true
cache: true
tag: ${{ github.ref_name }}
delete-merged-docker-tags:
if: ${{ github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'cs/') }}
runs-on: ohioit
steps:
- name: Determine tag name from branch name
env:
BRANCH_NAME: "${{ github.event.pull_request.head.ref }}"
run: |
echo "::set-output name=DOCKER_IMAGE_TAG::$(${BRANCH_NAME} | cut -d '/' -f 2)"
- name: Delete Docker tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IMAGE_TAG: "${{ env.DOCKER_IMAGE_TAG }}"
run: |
TAG="${IMAGE_TAG}"
REPO=ohioit/vscode-devcontainer-base
IMAGE=vscode-devcontainer-base
curl -X DELETE \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://ghcr.io/v2/${REPO}/${IMAGE}/manifests/${TAG}"