diff --git a/.github/workflows/release-and-package.yml b/.github/workflows/release-and-package.yml index 5907da9..9b57c0d 100644 --- a/.github/workflows/release-and-package.yml +++ b/.github/workflows/release-and-package.yml @@ -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: @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/run-tests-pebble.yml b/.github/workflows/run-tests-pebble.yml index de938a4..48097c0 100644 --- a/.github/workflows/run-tests-pebble.yml +++ b/.github/workflows/run-tests-pebble.yml @@ -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 @@ -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 @@ -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 @@ -38,6 +39,7 @@ 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 @@ -45,23 +47,26 @@ jobs: - 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/run-tests-staging-acmedns.yml b/.github/workflows/run-tests-staging-acmedns.yml index fd1adfa..9a3cab4 100644 --- a/.github/workflows/run-tests-staging-acmedns.yml +++ b/.github/workflows/run-tests-staging-acmedns.yml @@ -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 diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index b1669b9..38dcb49 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -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