Skip to content

gofumpt v0.7.0

gofumpt v0.7.0 #168

Workflow file for this run

name: Alpine
on:
release:
types:
- published
push:
branches:
- master
paths:
- .github/workflows/alpine.yml
- shell/**
- .dockerignore
- alpine.Dockerfile
pull_request:
paths:
- .github/workflows/alpine.yml
- shell/**
- .dockerignore
- alpine.Dockerfile
jobs:
verify:
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: "1"
steps:
- uses: actions/checkout@v4
- name: Build image
run: docker build -f alpine.Dockerfile -t qmcgaw/godevcontainer .
publish:
if: |
github.repository == 'qdm12/godevcontainer' &&
(
github.event_name == 'push' ||
github.event_name == 'release' ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')
)
needs: [verify]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
qmcgaw/godevcontainer
tags: |
type=ref,event=pr
type=semver,pattern=v{{major}}.{{minor}}.{{patch}}-alpine
type=semver,pattern=v{{major}}.{{minor}}-alpine
type=raw,value=alpine,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: qmcgaw
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Short commit
id: shortcommit
run: echo "value=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Build and push final image
uses: docker/build-push-action@v6
with:
file: alpine.Dockerfile
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6
labels: ${{ steps.meta.outputs.labels }}
build-args: |
CREATED=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
COMMIT=${{ steps.shortcommit.outputs.value }}
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
tags: ${{ steps.meta.outputs.tags }}
push: true