Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Feb 21, 2022
1 parent e756273 commit d4f0039
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/ci.yml
Expand Up @@ -34,6 +34,7 @@ jobs:
verify:
# Only run if it's a push event or if it's a PR from this repository, and it is not dependabot.
if: |
false &&
github.actor != 'dependabot[bot]' &&
(github.event_name == 'push' ||
github.event_name == 'release' ||
Expand Down Expand Up @@ -81,7 +82,7 @@ jobs:
github.event_name == 'push' ||
github.event_name == 'release' ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
needs: [verify]
# needs: [verify]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
Expand All @@ -97,14 +98,11 @@ jobs:
- name: Check for semver tag
id: semvercheck
run: |
if [[ ${{ github.ref }} =~ ^refs\/tags\/v0\.[0-9]+\.[0-9]+$ ]]; then
if [[ ${{ github.ref }} =~ ^refs\/tags\/v[1-9]+\.[0-9]+\.[0-9]+$ ]]; then
MATCH=true
else
MATCH=false
fi
if [[ ${{ github.ref }} =~ ^refs\/tags\/v[1-9]+\.[0-9]+\.[0-9]+$ ]]; then
MATCH=$MATCH_nonzero
fi
echo ::set-output name=match::$MATCH
# extract metadata (tags, labels) for Docker
Expand All @@ -121,15 +119,15 @@ jobs:
tags: |
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/master' }}
type=ref,event=pr
type=ref,event=tag,enable=${{ !startsWith(steps.semvercheck.outputs.match, 'true') }}
type=semver,pattern=v{{major}}.{{minor}}.{{patch}},enable=${{ startsWith(steps.semvercheck.outputs.match, 'true') }}
type=semver,pattern=v{{major}}.{{minor}},enable=${{ startsWith(steps.semvercheck.outputs.match, 'true') }}
type=semver,pattern=v{{major}},enable=${{ startsWith(steps.semvercheck.outputs.match, 'true_nonzero') }}
type=raw,value=latest,enable=${{ !startsWith(steps.semvercheck.outputs.match, 'true') }}
type=ref,event=tag,enable=${{ steps.semvercheck.outputs.match == 'true' }}
type=semver,pattern=v{{major}}.{{minor}}.{{patch}},enable=${{ steps.semvercheck.outputs.match == 'true' }}
type=semver,pattern=v{{major}}.{{minor}},enable=${{ steps.semvercheck.outputs.match == 'true' }}
type=semver,pattern=v{{major}},enable=${{ steps.semvercheck.outputs.match == 'true' }}
type=raw,value=latest,enable=${{ steps.semvercheck.outputs.match != 'true' }}
- name: Short commit
id: shortcommit
run: echo "::set-output name=value::$(git rev-parse --short HEAD)"
run: exit 1

- name: Build and push final image
uses: docker/build-push-action@v2.8.0
Expand Down

0 comments on commit d4f0039

Please sign in to comment.