diff --git a/.github/workflows/dip.yml b/.github/workflows/dip.yml index 4beb0e23..37a1fd09 100644 --- a/.github/workflows/dip.yml +++ b/.github/workflows/dip.yml @@ -8,8 +8,7 @@ jobs: runs-on: ubuntu-latest name: Check whether images are up-to-date steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v3 with: fetch-depth: 0 token: ${{ secrets.WORKFLOW_TOKEN }} diff --git a/.github/workflows/dive.yml b/.github/workflows/dive.yml index cca6a24a..dea599bd 100644 --- a/.github/workflows/dive.yml +++ b/.github/workflows/dive.yml @@ -6,8 +6,7 @@ jobs: runs-on: ubuntu-latest name: Analyze image efficiency steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Build image run: docker build -t utrecht/n3dr:${{ github.sha }} . - name: Dive diff --git a/.github/workflows/dockle.yml b/.github/workflows/dockle.yml index e3f94768..e5da1e99 100644 --- a/.github/workflows/dockle.yml +++ b/.github/workflows/dockle.yml @@ -6,8 +6,7 @@ jobs: runs-on: ubuntu-latest name: Analyze image using dockle steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Build image run: docker build -t utrecht/n3dr:${{ github.sha }} . - uses: hands-lab/dockle-action@v1 diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 92984115..9f7cceb7 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -14,7 +14,7 @@ jobs: - os: windows-2019 shasum: sha512sum steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Go uses: actions/setup-go@v2 with: diff --git a/.github/workflows/gosec.yml b/.github/workflows/gosec.yml index e79c5611..7a7fbd89 100644 --- a/.github/workflows/gosec.yml +++ b/.github/workflows/gosec.yml @@ -7,8 +7,7 @@ jobs: env: GO111MODULE: 'on' steps: - - name: Checkout Source - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Go uses: actions/setup-go@v2 with: diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.yml index 94d2ca7d..bd25cb82 100644 --- a/.github/workflows/hadolint.yml +++ b/.github/workflows/hadolint.yml @@ -6,8 +6,7 @@ jobs: runs-on: ubuntu-latest name: Analyze image using hadolint steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: hadolint/hadolint-action@v1.6.0 with: dockerfile: Dockerfile diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index e1837029..cb39609d 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -16,7 +16,7 @@ jobs: nexus-api-version: beta shasum: sha512sum steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Go uses: actions/setup-go@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release7.yml similarity index 95% rename from .github/workflows/release.yml rename to .github/workflows/release7.yml index d4274264..a0ee8e0e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release7.yml @@ -1,11 +1,8 @@ --- -name: Release -'on': - push: - tags: - - '*' +name: release7 +'on': [workflow_call] jobs: - release: + release7: name: Create Release runs-on: ${{ matrix.os }} strategy: @@ -18,7 +15,9 @@ jobs: - os: windows-2019 shasum: sha512sum steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + with: + ref: release/7 - name: Set up Go uses: actions/setup-go@v2 with: diff --git a/.github/workflows/snapcraft.yml b/.github/workflows/snapcraft.yml deleted file mode 100644 index baad3a08..00000000 --- a/.github/workflows/snapcraft.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: Snapcraft -'on': - workflow_run: - workflows: ['Release'] - push: - tags: - - '*' - types: - - completed -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - # yamllint disable rule:line-length - - name: Remove Docker - run: | - # https://github.com/canonical/lxd-cloud/blob/f20a64a8af42485440dcbfd370faf14137d2f349/test/includes/lxd.sh#L13-L23 - sudo rm -rf /etc/docker - sudo apt-get purge moby-buildx moby-engine moby-cli moby-compose moby-containerd moby-runc -y - sudo iptables -P FORWARD ACCEPT - - uses: snapcore/action-build@v1 - with: - path: build/package - id: snapcraft - - run: | - sudo snap install --dangerous ${{ steps.snapcraft.outputs.snap }} - n3dr --version | grep "[0-9]\." - - uses: snapcore/action-publish@v1 - with: - store_login: ${{ secrets.SNAPCRAFT_LOGIN }} - snap: ${{ steps.snapcraft.outputs.snap }} - release: 7/stable diff --git a/.github/workflows/snapcraft7.yml b/.github/workflows/snapcraft7.yml new file mode 100644 index 00000000..2e97e8ba --- /dev/null +++ b/.github/workflows/snapcraft7.yml @@ -0,0 +1,28 @@ +--- +name: snapcraft7 +'on': + push: + tags: + - 7.** +jobs: + release7: + uses: ./.github/workflows/release7.yml + snapcraft7: + needs: [release7] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: release/7 + - uses: snapcore/action-build@v1 + with: + path: build/package + id: snapcraft + - run: | + sudo snap install --dangerous ${{ steps.snapcraft.outputs.snap }} + n3dr --version | grep "[0-9]\." + - uses: snapcore/action-publish@v1 + with: + store_login: ${{ secrets.SNAPCRAFT_LOGIN }} + snap: ${{ steps.snapcraft.outputs.snap }} + release: candidate diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index fe09d0a5..b4f1d01a 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build an image from Dockerfile run: | docker build -t utrecht/n3dr:${{ github.sha }} . diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml index 41678496..7202564f 100644 --- a/.github/workflows/yamllint.yml +++ b/.github/workflows/yamllint.yml @@ -10,7 +10,6 @@ jobs: YAMLLINT_CONFIG_FILE: /code/configs/.yamllint.yaml options: --cpus 1 steps: - - name: Checkout code - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: run yamllint run: yamllint .