Skip to content

Commit

Permalink
Merge pull request srvrco#785 from srvrco/workflow-tweaks
Browse files Browse the repository at this point in the history
Change deploy to be manual
  • Loading branch information
timkimber committed Nov 14, 2022
2 parents 1e07c45 + 30c4594 commit 74a3393
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 49 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/release-and-package.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Hacked together from https://github.com/qemu-riscv-xpack/.github/workflows/build-all.yml
# and https://github.com/palmetto/palm-cli/blob/develop/.github/workflows/pypi-deploy.yaml

name: getssl Deploy
name: Deploy getssl

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
branches:
- main
workflow_dispatch:
inputs:
tags:
description: 'Tag to deploy, e.g. 2.47'
required: true
type: boolean

jobs:
deploy:
Expand All @@ -27,8 +27,8 @@ jobs:
- name: Check version matches tag
run: |
if [ "${{ steps.get_version.outputs.VERSION }}" != "getssl V${GITHUB_REF#refs/tags/v}" ]; then
echo "Version number in getssl (${{ steps.get_version.outputs.VERSION }}) does not match tag (getssl V${GITHUB_REF#refs/tags/v})"
if [ "${{ steps.get_version.outputs.VERSION }}" != "getssl V${{ github.event.inputs.tags }}" ]; then
echo "Version number in getssl (${{ steps.get_version.outputs.VERSION }}) does not match tag (getssl V${{ github.event.inputs.tags }})"
exit 1
fi
Expand All @@ -46,11 +46,11 @@ jobs:
mkdir -p /root/debbuild/SDEBS
mkdir -p /root/debbuild/SOURCES
mkdir -p /root/debbuild/SPECS
tar -czf /root/debbuild/SOURCES/getssl-${GITHUB_REF#refs/tags/v}.tar.gz ./getssl/* --transform "s/getssl\//getssl-${GITHUB_REF#refs/tags/v}\//"
tar --append -f /root/getssl-${GITHUB_REF#refs/tags/v}.sdeb /root/debbuild/SOURCES/getssl-${GITHUB_REF#refs/tags/v}.tar.gz --transform 's,\.,SOURCES,'
tar --append -f /root/getssl-${GITHUB_REF#refs/tags/v}.sdeb -C ./getssl getssl.crontab getssl.logrotate --transform 's,^,SOURCES/,'
tar --append -f /root/getssl-${GITHUB_REF#refs/tags/v}.sdeb -C ./getssl getssl.spec --transform 's,^,SPECS/,'
debbuild --install /root/getssl-${GITHUB_REF#refs/tags/v}.sdeb
tar -czf /root/debbuild/SOURCES/getssl-${{ github.event.inputs.tags }}.tar.gz ./getssl/* --transform "s/getssl\//getssl-${{ github.event.inputs.tags }}\//"
tar --append -f /root/getssl-${{ github.event.inputs.tags }}.sdeb /root/debbuild/SOURCES/getssl-${{ github.event.inputs.tags }}.tar.gz --transform 's,\.,SOURCES,'
tar --append -f /root/getssl-${{ github.event.inputs.tags }}.sdeb -C ./getssl getssl.crontab getssl.logrotate --transform 's,^,SOURCES/,'
tar --append -f /root/getssl-${{ github.event.inputs.tags }}.sdeb -C ./getssl getssl.spec --transform 's,^,SPECS/,'
debbuild --install /root/getssl-${{ github.event.inputs.tags }}.sdeb
debbuild -vv -ba /root/debbuild/SPECS/getssl.spec
- name: build .rpm package
Expand All @@ -63,7 +63,7 @@ jobs:
run: |
yum install -y rpm-build make
mkdir -p /root/rpmbuild/SOURCES /root/rpmbuild/RPMS/SRPMS /root/rpmbuild/RPMS/noarch
tar -czf /root/rpmbuild/SOURCES/getssl-${GITHUB_REF#refs/tags/v}.tar.gz /root/getssl/* --transform "s/root\/getssl\//getssl-${GITHUB_REF#refs/tags/v}\//"
tar -czf /root/rpmbuild/SOURCES/getssl-${{ github.event.inputs.tags }}.tar.gz /root/getssl/* --transform "s/root\/getssl\//getssl-${{ github.event.inputs.tags }}\//"
cp /root/getssl/getssl.crontab /root/rpmbuild/SOURCES
cp /root/getssl/getssl.logrotate /root/rpmbuild/SOURCES
rpmbuild -ba /root/getssl/getssl.spec
Expand All @@ -83,6 +83,6 @@ jobs:
draft: true
prerelease: false
artifacts: |
/root/debbuild/DEBS/all/getssl_${GITHUB_REF#refs/tags/v}-*_all.deb
/root/getssl-${GITHUB_REF#refs/tags/v}-*.src.rpm
/root/getssl-${GITHUB_REF#refs/tags/v}-*.noarch.rpm
/root/debbuild/DEBS/all/getssl_${{ github.event.inputs.tags }}-*_all.deb
/root/getssl-${{ github.event.inputs.tags }}-*.src.rpm
/root/getssl-${{ github.event.inputs.tags }}-*.noarch.rpm
51 changes: 31 additions & 20 deletions .github/workflows/run-tests-pebble.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ on:
push:
paths-ignore:
- '.github/workflows/*'
branches:
- master
pull_request:
branches:
- master
paths-ignore:
- '.github/workflows/*'
workflow_dispatch:
branches:
- master
paths-ignore:
- '.github/workflows/*'
jobs:
test-alpine:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # run this job only for the master branch
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
Expand All @@ -22,6 +21,7 @@ jobs:
run: test/run-test.sh alpine
test-bash-4-0:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # run this job only for the master branch
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
Expand All @@ -30,6 +30,7 @@ jobs:
run: test/run-test.sh bash4-0
test-bash-4-2:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # run this job only for the master branch
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
Expand All @@ -38,30 +39,34 @@ jobs:
run: test/run-test.sh bash4-2
test-bash-5-0:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # run this job only for the master branch
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
run: docker-compose up -d --build
- name: Run test suite on Alpine using Bash 5
run: test/run-test.sh bash5-0
test-centos6:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
run: docker-compose up -d --build
- name: Run test suite on CentOS6
run: test/run-test.sh centos6
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # run this job only for the master branch
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
run: docker-compose up -d --build
- name: Run test suite on CentOS6
run: test/run-test.sh centos6
test-centos7:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
run: docker-compose up -d --build
- name: Run test suite on CentOS7
run: test/run-test.sh centos7
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # run this job only for the master branch
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
run: docker-compose up -d --build
- name: Run test suite on CentOS7
run: test/run-test.sh centos7
test-centos8:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # run this job only for the master branch
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
Expand All @@ -70,6 +75,7 @@ jobs:
run: test/run-test.sh centos8
test-debian:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # run this job only for the master branch
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
Expand All @@ -78,6 +84,7 @@ jobs:
run: test/run-test.sh debian
test-rockylinux8:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # run this job only for the master branch
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
Expand All @@ -86,6 +93,7 @@ jobs:
run: test/run-test.sh rockylinux8
test-ubuntu:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # run this job only for the master branch
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
Expand All @@ -94,6 +102,7 @@ jobs:
run: test/run-test.sh ubuntu
test-ubuntu14:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # run this job only for the master branch
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
Expand All @@ -102,6 +111,7 @@ jobs:
run: test/run-test.sh ubuntu14
test-ubuntu16:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # run this job only for the master branch
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
Expand All @@ -110,6 +120,7 @@ jobs:
run: test/run-test.sh ubuntu16
test-ubuntu18:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # run this job only for the master branch
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/run-tests-staging-acmedns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ on:
push:
paths-ignore:
- '.github/workflows/*'
branches:
- master
pull_request:
branches:
- master
paths-ignore:
- '.github/workflows/*'
workflow_dispatch:
branches:
- master
paths-ignore:
- '.github/workflows/*'

env:
DYNU_API_KEY: ${{ secrets.DYNU_API_KEY == '' && '65cXefd35XbYf36546eg5dYcZT6X52Y2' || secrets.DYNU_API_KEY }}

jobs:
test-ubuntu-acmedns:
runs-on: ubuntu-latest
if: always()
if: github.ref == 'refs/heads/master' # run this job only for the master branch
steps:
- uses: actions/checkout@v3
- name: Build the docker-compose stack
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ on:
push:
paths-ignore:
- '.github/workflows/*'
branches: [ master ]
pull_request:
branches: [ master ]
paths-ignore:
- '.github/workflows/*'
workflow_dispatch:
branches:
- master
paths-ignore:
- '.github/workflows/*'

jobs:
lint:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # run this job only for the master branch
steps:
- uses: actions/checkout@v3
- name: Lint check
Expand Down

0 comments on commit 74a3393

Please sign in to comment.